Added app icon and logo in window
This commit is contained in:
parent
2dfc748f90
commit
893f822341
@ -1,15 +1,29 @@
|
||||
#import tkinter as tk
|
||||
import sys
|
||||
import os
|
||||
from PyQt5.QtWidgets import QApplication, QWidget
|
||||
from PyQt5 import QtCore
|
||||
from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QMainWindow, QGridLayout
|
||||
from PyQt5.QtGui import QIcon, QPixmap
|
||||
|
||||
|
||||
def main():
|
||||
app = QApplication(sys.argv)
|
||||
|
||||
w = QWidget()
|
||||
w.resize(250, 150)
|
||||
w.move(300, 300)
|
||||
w.setWindowTitle('Simple')
|
||||
#w = QWidget()
|
||||
w = QMainWindow()
|
||||
w.setGeometry(0, 0, 600, 400)
|
||||
w.setWindowTitle('VisionScore')
|
||||
scriptDir = os.path.dirname(os.path.realpath(__file__))
|
||||
w.setWindowIcon(QIcon(scriptDir + os.path.sep + 'static/v_logo.jpg'))
|
||||
|
||||
label = QLabel()
|
||||
pixmap = QPixmap(scriptDir + os.path.sep + 'static/visionscore_logo.jpg')
|
||||
label.setPixmap(pixmap)
|
||||
label.resize(pixmap.width(), pixmap.height())
|
||||
label.setAlignment(QtCore.Qt.AlignTop)
|
||||
w.setCentralWidget(label)
|
||||
|
||||
|
||||
w.show()
|
||||
|
||||
sys.exit(app.exec_())
|
||||
|
BIN
win_venv/static/v_logo.jpg
Normal file
BIN
win_venv/static/v_logo.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
BIN
win_venv/static/visionscore_logo.jpg
Normal file
BIN
win_venv/static/visionscore_logo.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.7 KiB |
Loading…
Reference in New Issue
Block a user