On Friday 01 April 2011 18:45:44 Hervé VENZAC wrote:
> Thank you for answer.
>
> When I convert my .qrc file the name is rc.py for example and
> then I import it with : "import rc"..
>
> It is working for a QIcon(':/picture/icon.png')
>
> but not with QUrl(':/web/localisation.html')
>
> Herve
>
> <http://www.weather-measures.com>
>
> *Hervé VENZAC
> Ingénieur d'études*
>
> -------------------------------------------------------------
> ----------- *6, allée Alan Turing - BP 30242 - Parc
> Technologique de la Pardieu 63175 AUBIERE Cedex - FRANCE
> Tél: +33 (0)4 73 44 56 07 / 06 80 91 38 68
> Tél secrétariat: +33 (0)4 73 28 75 96 - Fax: +33 (0)4 73 28
> 75 99 *
>
> Le 01/04/2011 00:03, Algis Kabaila a écrit :
> > On Thursday 31 March 2011 19:07:15 Hervé VENZAC wrote:
> >> Hello,
> >>
> >> When a QWebView tries to load a .html in a resource
> >> file
> >>
> >> it does not work.
> >>
> >> The resource (.qrc) is converted help to pyside-rcc.
> >>
> >> When I try to load the file (not as a resource) it is
> >>
> >> workink well. self.webView.load(QUrl('localisation.html'))
> >>
> >> But in the resource file :
> >> self.webView.load(QUrl(':/web/localisation.html')) it is
> >> not working.
At a guess, it is because localisation.html is a html format and
not icon image format. It would be helpful to detect your
problems if you supplied sample code that you expect to work.
Without that all the comments have to be guesswork - something
that a climate scientist would not (and should not!) accept.
Good luck,
OldAl.
> >>
> >> I also add a .png in the resource file to add an QIcon to
> >> my Window and it is working when using it :
> >> QIcon(':/picture/icon.png')
> >>
> >> Probably I'm doing something wrong but I don't know what !
> >>
> >> Thanks to help me.
> >>
> >> Hervé Venzac
> >
> > Did you import the *.rcc file? You need to do that for
> > resouces to work as intended.
> >
> > HTH,
> >
> > OldAl.
--
Algis
http://akabaila.pcug.org.au/StructuralAnalysis.pdf
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside