Use resource file
Use Qt resource files, compile it to Python to obtain a window that has an icon! Finally! It is still using the Oxygen icon for Database, since I have nothing better to use.
This commit is contained in:
parent
0f4cc1ab94
commit
732024de0e
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,4 +3,4 @@
|
||||
relational_gui/survey.py
|
||||
relational_gui/maingui.py
|
||||
relational_gui/rel_edit.py
|
||||
|
||||
relational_gui/resources.py
|
||||
|
1
Makefile
1
Makefile
@ -4,6 +4,7 @@ pyqt:
|
||||
pyuic5 relational_gui/survey.ui > relational_gui/survey.py
|
||||
pyuic5 relational_gui/maingui.ui > relational_gui/maingui.py
|
||||
pyuic5 relational_gui/rel_edit.ui > relational_gui/rel_edit.py
|
||||
pyrcc5 relational_gui/resources.qrc > relational_gui/resources.py
|
||||
|
||||
uninstall:
|
||||
rm -rf /opt/relational
|
||||
|
@ -85,7 +85,7 @@ if __name__ == "__main__":
|
||||
import sip # needed on windows
|
||||
from PyQt5 import QtGui, QtWidgets
|
||||
try:
|
||||
from relational_gui import maingui, guihandler, about, surveyForm
|
||||
from relational_gui import maingui, guihandler, about, surveyForm, resources
|
||||
except:
|
||||
print (
|
||||
"Module relational_gui is missing.\nPlease install relational package.",
|
||||
|
@ -20,6 +20,10 @@
|
||||
<property name="windowTitle">
|
||||
<string>Relational</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset>
|
||||
<normaloff>:/icon</normaloff>:/icon</iconset>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
|
5
relational_gui/resources.qrc
Normal file
5
relational_gui/resources.qrc
Normal file
@ -0,0 +1,5 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file alias="icon">resources/relational.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
BIN
relational_gui/resources/relational.png
Normal file
BIN
relational_gui/resources/relational.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
Loading…
Reference in New Issue
Block a user