You have to enable gif support and recompile Qt. But it's not enough to make animated gifs work. You have to use QMovie.
You have to enable gif support and recompile Qt. But it's not enough to make animated gifs work. You have to use QMovie.
ok, with animations i'll "play" later
know, I tried to use resources, as you said...
.qrc file:
In my .pro I added RESOURCES = res.qrc .Qt Code:
<!DOCTYPE RCC><RCC version="1.0"> <qresource> <file>images/icon.jpg</file> </qresource> </RCC>To copy to clipboard, switch view to plain text mode
And finally, in my constructor i put down
No result..Qt Code:
To copy to clipboard, switch view to plain text mode![]()
Is the path correct during compilation (debug/release folder issues again)? What does QFile::exists(":/images/icon.jpg") return?
well, QFile::exists() return true. What about the path, tutorial says that
And nothing about debug/release folders path..The specified paths are relative to the directory containing the .qrc file.
What happens if you try to display a PNG file instead of a JPEG? And please test on a QLabel and not using a window icon.
No result... I add to /images an png image - image.png
To res.qrc I add -
And my .cpp:Qt Code:
<file>images/image.png</file>To copy to clipboard, switch view to plain text mode
//qSpeed is a labelQt Code:
To copy to clipboard, switch view to plain text mode
Have you recompiled your resource?
First of all, did you run qmake after adding the resource file to the project?
marcel, wysota:
sure
But, can I put my icon on a label, by using QLabel::setWindowIcon(QIcon(...)) ? Maybe this is the problem?...
No.
Use QLabel::setPixmap.
no result.....:-\Qt Code:
To copy to clipboard, switch view to plain text mode
Are you sure that qSpeed is inside a proper layout?
Try also qSpeed->setMinimumSize( pixmap.size() ).
Bookmarks