Hello,
We are trying to set a pixmap in QLabel.. but when i give the relative path the QLabel is not displaying the QPixmap...
the hierarchy is as below.
[HTML] /root/Desktop/source
| |
| |
dlg icons[/HTML]
I have My sourcefile *.cpp in dlg and pixmap (*.xpm) in icons..
// Not setting pixmap
labelObj_1
->setPixmap
( QPixmap("../icons/RIcon.xpm" ) );
// Setting pixmap
labelObj_2
->setPixmap
( QPixmap( "/root/Desktop/source/icons/TIcon.xpm" ) );
// Not setting pixmap
labelObj_1->setPixmap( QPixmap("../icons/RIcon.xpm" ) );
// Setting pixmap
labelObj_2->setPixmap( QPixmap( "/root/Desktop/source/icons/TIcon.xpm" ) );
To copy to clipboard, switch view to plain text mode
labelObj_1 is unable to resolve the path and not setting the pixmap.. where as
labelObj_2 is able to set the pixmap....
Why the label not resolving if the relative path given....,?????
thanks..
Bookmarks