Hello everyone,
I wanted to associate a pixmap to a QLabel.
For that, I trusted Qt Designer.
I declared my pixmap to a qt resource file
and then have associated with my famous QLabel.
uic generates the following line:
Qt Code:
To copy to clipboard, switch view to plain text mode
To me, it seems correct.
The compilation of the application goes smoothly.
Note: that the .cpp generated by rcc is well taken into account by the compilation chain.
However, the pixmap does not appear in place of the label.
Qt may dislike the ICO format. Never mind, I converted to PNG.
Still nothing but a construction error since each time the pixmap, QLabel:: pixmap () -> isNull () is true.
I give up the resource file to associate the file directly. Ico to my label.
And then I'll give you a thousand, it works!
However, I missed something?? ... Or is it a bug in Qt ? In any case, I saw nothing of this kind, reported.
Bookmarks