On Thursday 05 May 2011, 21:19:50 Hugo Léveillé wrote: > Hi > > Lets say I have a styleheet and an image file in the same folder > > QTextEdit, QListView { > background-color: white; > background-image: url(myImage.png); > background-attachment: scroll; > } > > I expected this to work since they are at the same level but I still > have to type the whole path like so: > > QTextEdit, QListView { > background-color: white; > background-image: url(/path/to/my/file/myImage.png); > background-attachment: scroll; > } > > What would be the correct syntax to make the filename relative to the > stylesheet so that the image will load on any machine no matter the > root path
No idea, but have you checked: - QDir.currentPath() - prepending ./ - using Qt's resource system Pete _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt