-
setWindowIcon
Hello anybody,
I'am using Fedora Core 5 with KDE-4
I'am also using QT-4.1.3
I want to put my own icon on the taskbar next to the windowtitle.
If i do in designer nothing happens.
if i put in mainwindow.cpp: setWindowIcon(QIcon(":/images/triple20.png"));
also nothing happens.
I also tried it in main.cpp: app.setWindowIcon(QIcon(":/images/triple20.png"));
also nothing happens.
I also search the net but i can't find anything about this item.
I also read the documentation from Trolltech about this.
Is it posibble to put a icon on the taskbar.
-
Re: setWindowIcon
Are you sure if the path to the image is correct? Could you verify that for example by showing the image in a window?
-
Re: setWindowIcon
I have got a file called images.
In this file i have got triple20.png and triple50.png
Here is some code of a MessageBox i use:
[HTML]void MainWindow::info()
{
QMessageBox *mb = new QMessageBox(this);
mb->setWindowIcon(QIcon(":/images/triple20.png"));
mb->setWindowTitle( "Triple/S");
QPixmap pm (":/images/triple50.png");
mb->setIconPixmap( pm );
etc.....
mb->exec();
}[/HTML]
In this MessageBox the setWindowIcon is nothing showing in the taskbar.
The setIconPixmap is showing nicely the triple50.png in the MessageBox window.
-
Re: setWindowIcon
How resize windowiconsize of mainwindow