summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-23 09:53:51 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-23 09:55:08 -0700
commit315c0b505c94e0a4cc14948ff47180576e4786ed (patch)
treeabe8eee6baa3a8bf285a593ac3b2e9b3fde45928
parentd72f4e470a42b50ad70a33fd4c389c1318b45bf1 (diff)
downloadsubsurface-315c0b505c94e0a4cc14948ff47180576e4786ed.tar.gz
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>
-rw-r--r--qt-ui/mainwindow.cpp1
-rw-r--r--subsurface.qrc1
2 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index bb4bda1af..adfb3c74a 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -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);
diff --git a/subsurface.qrc b/subsurface.qrc
index e257bf8f5..e1939f28e 100644
--- a/subsurface.qrc
+++ b/subsurface.qrc
@@ -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>