veda
14th June 2007, 13:47
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.
/root/Desktop/source
| |
| |
dlg icons
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" ) );
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..
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.
/root/Desktop/source
| |
| |
dlg icons
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" ) );
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..