mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-05-27 07:29:33 +00:00
Create test program with server with new gui
This commit is contained in:
26
Server/server_qt.py
Normal file
26
Server/server_qt.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
# Импортируем нашу форму.
|
||||
from server_gui import Ui_MainWindow
|
||||
import sys
|
||||
|
||||
|
||||
class main_window(QtWidgets.QMainWindow):
|
||||
def __init__(self):
|
||||
super(main_window, self).__init__()
|
||||
self.ui = Ui_MainWindow()
|
||||
self.ui.setupUi(self)
|
||||
|
||||
self.ui.tableWidget.setColumnCount(6)
|
||||
self.ui.tableWidget.setRowCount(20)
|
||||
self.ui.tableWidget.setHorizontalHeaderLabels(
|
||||
('copter ID', 'animation ID', 'battery V', 'battery %', 'selfcheck', 'time UTC')
|
||||
)
|
||||
self.ui.tableWidget.horizontalHeader().setStretchLastSection(True)
|
||||
|
||||
|
||||
app = QtWidgets.QApplication([])
|
||||
application = main_window()
|
||||
application.show()
|
||||
|
||||
sys.exit(app.exec())
|
||||
Reference in New Issue
Block a user