Add icon files to resource file.
Having resource files compiled in the executable makes installing the application easier (especially on Windows).
This commit is contained in:
parent
3f3b1279da
commit
d73ab89c93
|
@ -9,6 +9,7 @@ INCLUDEPATH += .
|
||||||
MOC_DIR = temp
|
MOC_DIR = temp
|
||||||
OBJECTS_DIR = temp
|
OBJECTS_DIR = temp
|
||||||
CONFIG += warn_on debug
|
CONFIG += warn_on debug
|
||||||
|
RESOURCES = gui.qrc
|
||||||
|
|
||||||
# Input
|
# Input
|
||||||
HEADERS += mainwindow.h \
|
HEADERS += mainwindow.h \
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE RCC><RCC version="1.0">
|
||||||
|
<qresource>
|
||||||
|
<file>icon.png</file>
|
||||||
|
<file>icon.svg</file>
|
||||||
|
<file>images/dialog-error.png</file>
|
||||||
|
<file>images/dialog-information.png</file>
|
||||||
|
<file>images/dialog-warning.png</file>
|
||||||
|
<file>images/edit-clear.png</file>
|
||||||
|
<file>images/go-down.png</file>
|
||||||
|
<file>images/help-browser.png</file>
|
||||||
|
<file>images/media-floppy.png</file>
|
||||||
|
<file>images/preferences-system.png</file>
|
||||||
|
<file>images/process-stop.png</file>
|
||||||
|
<file>images/text-x-generic.png</file>
|
||||||
|
<file>images/view-refresh.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
|
@ -24,7 +24,7 @@
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
app.setWindowIcon(QIcon("icon.png"));
|
app.setWindowIcon(QIcon(":icon.png"));
|
||||||
|
|
||||||
MainWindow window;
|
MainWindow window;
|
||||||
window.show();
|
window.show();
|
||||||
|
|
|
@ -109,13 +109,13 @@ MainWindow::MainWindow() :
|
||||||
QToolBar *toolbar = addToolBar("Toolbar");
|
QToolBar *toolbar = addToolBar("Toolbar");
|
||||||
toolbar->setIconSize(QSize(22, 22));
|
toolbar->setIconSize(QSize(22, 22));
|
||||||
|
|
||||||
mActionCheckDirectory.setIcon(QIcon("icon.svg"));
|
mActionCheckDirectory.setIcon(QIcon(":icon.svg"));
|
||||||
mActionReCheck.setIcon(QIcon("images/view-refresh.png"));
|
mActionReCheck.setIcon(QIcon(":images/view-refresh.png"));
|
||||||
mActionSettings.setIcon(QIcon("images/preferences-system.png"));
|
mActionSettings.setIcon(QIcon(":images/preferences-system.png"));
|
||||||
mActionAbout.setIcon(QIcon("images/help-browser.png"));
|
mActionAbout.setIcon(QIcon(":images/help-browser.png"));
|
||||||
mActionStop.setIcon(QIcon("images/process-stop.png"));
|
mActionStop.setIcon(QIcon(":images/process-stop.png"));
|
||||||
mActionSave.setIcon(QIcon("images/media-floppy.png"));
|
mActionSave.setIcon(QIcon(":images/media-floppy.png"));
|
||||||
mActionClearResults.setIcon(QIcon("images/edit-clear.png"));
|
mActionClearResults.setIcon(QIcon(":images/edit-clear.png"));
|
||||||
|
|
||||||
toolbar->addAction(&mActionCheckDirectory);
|
toolbar->addAction(&mActionCheckDirectory);
|
||||||
toolbar->addAction(&mActionSave);
|
toolbar->addAction(&mActionSave);
|
||||||
|
|
|
@ -285,7 +285,7 @@ QStandardItem *ResultsTree::EnsureFileItem(const QString &name)
|
||||||
}
|
}
|
||||||
|
|
||||||
item = CreateItem(name);
|
item = CreateItem(name);
|
||||||
item->setIcon(QIcon("images/text-x-generic.png"));
|
item->setIcon(QIcon(":images/text-x-generic.png"));
|
||||||
|
|
||||||
mModel.appendRow(item);
|
mModel.appendRow(item);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue