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:
parent
d72f4e470a
commit
315c0b505c
@ -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);
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user