set app icon for windows

Signed-off-by: Le Tan <tamlokveer@gmail.com>
This commit is contained in:
Le Tan 2016-11-11 22:07:15 +08:00
parent 550a3707a5
commit 201d14116f
5 changed files with 13 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<svg width="512" height="512" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
<g>
<title>Layer 1</title>
<rect stroke-opacity="0" id="svg_1" height="512" width="512" y="0" x="0" stroke-width="5" stroke="#000000" fill="#007f00"/>
<text stroke="#000000" transform="matrix(43.26813891090647,0,0,13.274300463995566,-6171.349170333156,-1955.6540426635258) " font-weight="bold" xml:space="preserve" text-anchor="middle" font-family="Sans-serif" font-size="24" id="svg_2" y="179.303718" x="148.329363" stroke-opacity="0" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" fill="#ffffff">V</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 758 B

View File

@ -11,6 +11,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = VNote TARGET = VNote
TEMPLATE = app TEMPLATE = app
RC_ICONS = resources/icons/vnote.ico
SOURCES += main.cpp\ SOURCES += main.cpp\
vmainwindow.cpp \ vmainwindow.cpp \

View File

@ -16,6 +16,7 @@ extern VConfigManager vconfig;
VMainWindow::VMainWindow(QWidget *parent) VMainWindow::VMainWindow(QWidget *parent)
: QMainWindow(parent), notebookComboMuted(false) : QMainWindow(parent), notebookComboMuted(false)
{ {
setWindowIcon(QIcon(":/resources/icons/vnote.ico"));
// Must be called before those who uses VConfigManager // Must be called before those who uses VConfigManager
vnote = new VNote(); vnote = new VNote();
initPredefinedColorPixmaps(); initPredefinedColorPixmaps();

View File

@ -59,5 +59,7 @@
<file>resources/icons/corner_tablist.svg</file> <file>resources/icons/corner_tablist.svg</file>
<file>resources/icons/outline.svg</file> <file>resources/icons/outline.svg</file>
<file>resources/icons/create_rootdir_tb.svg</file> <file>resources/icons/create_rootdir_tb.svg</file>
<file>resources/icons/vnote.svg</file>
<file>resources/icons/vnote.ico</file>
</qresource> </qresource>
</RCC> </RCC>