-
Notifications
You must be signed in to change notification settings - Fork 5
/
teste_classe_agressividade.py
58 lines (42 loc) · 1.89 KB
/
teste_classe_agressividade.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import sys
from PyQt5.uic import loadUi
from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QMessageBox, QVBoxLayout, QHBoxLayout, QDialog, QMessageBox
from PyQt5.QtGui import QPixmap, QIcon, QImage
from PyQt5 import QtWidgets, QtGui, QtCore
from PyQt5.QtWidgets import QTableWidget,QTableWidgetItem
class Tabela_Classe_Agressividade(QtWidgets.QMainWindow):
def __init__(self):
super().__init__()
self.load_ui()
self.load_signals()
def load_ui(self):
self.ui = loadUi('class_agres.ui',self)
self.setWindowTitle('Navier - Classes de Agressividade e Cobrimentos Mínimos')
self.show()
def load_signals(self):
print('inicializado')
header = self.tableWidget.horizontalHeader()
header.setSectionResizeMode(0, QtWidgets.QHeaderView.Stretch)
header.setSectionResizeMode(1, QtWidgets.QHeaderView.Stretch)
header.setSectionResizeMode(2, QtWidgets.QHeaderView.Stretch)
header.setSectionResizeMode(3, QtWidgets.QHeaderView.Stretch)
self.tableWidget.setSpan(0, 0, 1, 4)
#self.tableWidget.horizontalHeader().setVisible(False) //QtWidgets.QHeaderView.ResizeToContents
header_2 = self.tableWidget_2.horizontalHeader()
header_2.setSectionResizeMode(0, QtWidgets.QHeaderView.Stretch)
header_2.setSectionResizeMode(1, QtWidgets.QHeaderView.Stretch)
header_2.setSectionResizeMode(2, QtWidgets.QHeaderView.Stretch)
header_2.setSectionResizeMode(3, QtWidgets.QHeaderView.ResizeToContents)
self.tableWidget_2.setSpan(0, 0, 2, 1)
self.tableWidget_2.setSpan(0, 1, 2, 1)
self.tableWidget_2.setSpan(0, 3, 2, 1)
self.tableWidget_2.setSpan(3, 0, 2, 1)
self.tableWidget_2.setSpan(3, 1, 2, 1)
self.tableWidget_2.setSpan(3, 3, 2, 1)
self.tableWidget_2.setSpan(5, 0, 2, 1)
self.tableWidget_2.setSpan(5, 1, 2, 1)
self.tableWidget_2.setSpan(5, 3, 2, 1)
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
aplicacao = Tabela_Classe_Agressividade()
app.exec_()