View Full Version : KMainWindow Icon

28th February 2006, 15:44
Hello there,

I' m using KDE 3.2.1 and Qt 3.1.1 and I would change the icon from the KMainWindow. I tried QWidget::setIcon but nothing happend??

1st March 2006, 12:30

how do I set the icon in a QMainWindow (QT 3.3.1). setIcon didn't work??

1st March 2006, 12:47
Try this: http://doc.trolltech.com/3.3/appicon.html and please, don't start multiple threads regarding the same problem.

1st March 2006, 13:46
Is there another way to to it in the code (like setIcon() function ). I don't understand the way discribed in that document?! THX

1st March 2006, 14:28
What does QWidget::icon() return after you set the icon with QWidget::setIcon()? How do you create the pixmap that will be the icon?

1st March 2006, 15:42
First: If I use the same code on a QLabel it shows the right icon.

Second: setIcon( QPixmap( "/home/cpepe/Desktop/opencase-1.0/icons/32x32/blockdevice.png" ) );

The Icon of the Dialogs witch opens as childs from QMainWindow has the new (Application-) Icon, if I set it with setIcon().

1st March 2006, 17:00
Ok, I've done a little research and I think you should try KWin::setIcons().