[Qt-interest] setWindowIcon() not working on QDialogs/QWidgets displayed on top of a QGraphicsScene
Christian Buchner
christian.buchner at gmail.com
Fri Sep 11 11:30:00 CEST 2009
Hello!
We have developed a radio engineering application based on this sample
code from the Graphics Dojo blog, also featured in QT Quarterly Issue
#26.
http://doc.trolltech.com/qq/qq26-openglcanvas.html
Basically it displays semi-transparent QT Widgets in front of an
OpenGL rendered 3D scene. We use OpenSceneGraph in our application
instead of directly programming OpenGL, as is done in the example
code.
The dialog widgets from the sample have a constructor like this and
lack a close button
QDialog *dialog = new QDialog(0, Qt::CustomizeWindowHint |
Qt::WindowTitleHint);
We have added the Qt::WindowCloseButtonHint flag because we wanted the
dialogs to be removable by the user. This adds a close button, but
also a generic green "Qt" icon in the top left edge of the widget.
Setting a transparent icon using setWindowIcon() did not remove this
generic Qt icon. We still use Qt 4.5.0
Is there any other way to possibly remove or replace this generic Qt
icon without actually altering the Qt source code itself?
Christian
More information about the Qt-interest-old
mailing list