Skip to content

Commit f7f7a38

Browse files
committed
add icon to application
1 parent 55b6f68 commit f7f7a38

File tree

5 files changed

+23
-6
lines changed

5 files changed

+23
-6
lines changed

Esp-Ota-UI.pro

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,20 @@ CONFIG += c++11
2626

2727
SOURCES += \
2828
main.cpp \
29-
mainwindow.cpp
29+
mainwindow.cpp \
3030

3131
HEADERS += \
3232
mainwindow.h \
33-
variables.h
33+
variables.h \
3434

3535
FORMS += \
3636
mainwindow.ui
3737

38+
RESOURCES += \
39+
src.qrc
40+
41+
RC_ICONS = resources/esp_upload.ico
42+
3843
# Default rules for deployment.
3944
qnx: target.path = /tmp/$${TARGET}/bin
4045
else: unix:!android: target.path = /opt/$${TARGET}/bin

mainwindow.ui

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>690</width>
10-
<height>429</height>
9+
<width>678</width>
10+
<height>417</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
1414
<string>OTA Upload</string>
1515
</property>
16+
<property name="windowIcon">
17+
<iconset resource="src.qrc">
18+
<normaloff>:/resources/esp_upload.ico</normaloff>:/resources/esp_upload.ico</iconset>
19+
</property>
1620
<widget class="QWidget" name="centralWidget">
1721
<layout class="QHBoxLayout" name="horizontalLayout">
1822
<property name="leftMargin">
@@ -30,7 +34,7 @@
3034
<item>
3135
<widget class="QTabWidget" name="twTabs">
3236
<property name="currentIndex">
33-
<number>1</number>
37+
<number>0</number>
3438
</property>
3539
<widget class="QWidget" name="tab">
3640
<attribute name="title">
@@ -942,6 +946,8 @@ output</string>
942946
<tabstop>twTabs</tabstop>
943947
<tabstop>leImagePath</tabstop>
944948
</tabstops>
945-
<resources/>
949+
<resources>
950+
<include location="src.qrc"/>
951+
</resources>
946952
<connections/>
947953
</ui>

resources/esp_upload.ico

313 KB
Binary file not shown.

resources/esp_upload.png

94.8 KB
Loading

src.qrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<RCC>
2+
<qresource prefix="/">
3+
<file>resources/esp_upload.png</file>
4+
<file>resources/esp_upload.ico</file>
5+
</qresource>
6+
</RCC>

0 commit comments

Comments
 (0)