[Qt-interest] Setting the Window Icon
Malyushytsky, Alex
alex at wai.com
Wed Feb 16 00:34:44 CET 2011
My guesses this is failure to find image file.
Try to use absolute path instead of relative and check if file exists.
Put some code which will notify you about path when does not.
Alex
From: qt-interest-bounces+alex=wai.com at qt.nokia.com [mailto:qt-interest-bounces+alex=wai.com at qt.nokia.com] On Behalf Of O'carroll, David T
Sent: Tuesday, February 15, 2011 6:10 AM
To: qt-interest at qt.nokia.com
Subject: [Qt-interest] Setting the Window Icon
Hi,
I am trying to integrate a demo into the Meego IVI UX. I am trying to set the window icon of an application to a different image depending on what QWidget is running. The QWidget is launched as the application starts and is passed to the application as an argument (so it only needs to be set once). Currently I am setting it in main.cpp with:
QApplication::setWindowIcon(QIcon("/path/to/image.png"));
However, this leads to somewhat random results wherein the image is set sometimes and not others. Is there something I'm missing about QIcon (I'm used to working with QPixmap) or am I simply going about this the wrong?
Regards,
Dave
--------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110215/36bbf360/attachment.html
More information about the Qt-interest-old
mailing list