Set the window icon in Qt

And even use the resource file to allow me to use an alias for it in the
actual code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-04-23 09:53:51 -07:00
parent d72f4e470a
commit 315c0b505c
2 changed files with 2 additions and 0 deletions

View file

@ -26,6 +26,7 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow()),
{
ui->setupUi(this);
ui->ListWidget->setModel(model);
this->setWindowIcon(QIcon(":subsurface-icon"));
// Just to test the star widgets, can be safely removed.
StarWidget *star = new StarWidget(0);
star->setMaximumStars(10);

View file

@ -1,5 +1,6 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file alias="star">star.svg</file>
<file alias="subsurface-icon">subsurface-icon.png</file>
</qresource>
</RCC>