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
|
||||
OBJECTS_DIR = temp
|
||||
CONFIG += warn_on debug
|
||||
RESOURCES = gui.qrc
|
||||
|
||||
# Input
|
||||
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[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
app.setWindowIcon(QIcon("icon.png"));
|
||||
app.setWindowIcon(QIcon(":icon.png"));
|
||||
|
||||
MainWindow window;
|
||||
window.show();
|
||||
|
|
|
@ -109,13 +109,13 @@ MainWindow::MainWindow() :
|
|||
QToolBar *toolbar = addToolBar("Toolbar");
|
||||
toolbar->setIconSize(QSize(22, 22));
|
||||
|
||||
mActionCheckDirectory.setIcon(QIcon("icon.svg"));
|
||||
mActionReCheck.setIcon(QIcon("images/view-refresh.png"));
|
||||
mActionSettings.setIcon(QIcon("images/preferences-system.png"));
|
||||
mActionAbout.setIcon(QIcon("images/help-browser.png"));
|
||||
mActionStop.setIcon(QIcon("images/process-stop.png"));
|
||||
mActionSave.setIcon(QIcon("images/media-floppy.png"));
|
||||
mActionClearResults.setIcon(QIcon("images/edit-clear.png"));
|
||||
mActionCheckDirectory.setIcon(QIcon(":icon.svg"));
|
||||
mActionReCheck.setIcon(QIcon(":images/view-refresh.png"));
|
||||
mActionSettings.setIcon(QIcon(":images/preferences-system.png"));
|
||||
mActionAbout.setIcon(QIcon(":images/help-browser.png"));
|
||||
mActionStop.setIcon(QIcon(":images/process-stop.png"));
|
||||
mActionSave.setIcon(QIcon(":images/media-floppy.png"));
|
||||
mActionClearResults.setIcon(QIcon(":images/edit-clear.png"));
|
||||
|
||||
toolbar->addAction(&mActionCheckDirectory);
|
||||
toolbar->addAction(&mActionSave);
|
||||
|
|
|
@ -285,7 +285,7 @@ QStandardItem *ResultsTree::EnsureFileItem(const QString &name)
|
|||
}
|
||||
|
||||
item = CreateItem(name);
|
||||
item->setIcon(QIcon("images/text-x-generic.png"));
|
||||
item->setIcon(QIcon(":images/text-x-generic.png"));
|
||||
|
||||
mModel.appendRow(item);
|
||||
|
||||
|
|
Loading…
Reference in New Issue