-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewdonations.py
50 lines (41 loc) · 1.98 KB
/
viewdonations.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
from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
QRect, QSize, QUrl, Qt)
from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
QRadialGradient)
from PySide2.QtCharts import QtCharts
from PySide2.QtGui import QPainter
from PySide2.QtWidgets import *
class Ui_Forma(object):
def setupUi(self, Form,result):
Form.setObjectName("Form")
Form.resize(482, 451)
self.verticalLayout = QVBoxLayout(Form)
self.verticalLayout.setObjectName("verticalLayout")
self.tableWidget = QTableWidget(Form)
sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.tableWidget.sizePolicy().hasHeightForWidth())
self.tableWidget.setSizePolicy(sizePolicy)
self.tableWidget.setMinimumSize(QSize(0, 0))
self.tableWidget.setRowCount(8)
self.tableWidget.setColumnCount(3)
self.tableWidget.setObjectName("tableWidget")
self.verticalLayout.addWidget(self.tableWidget)
self.tableWidget.setRowCount(0)
for row_number, row_data in enumerate(result):
#print(row_number)
self.tableWidget.insertRow(row_number)
for column_number, data in enumerate(row_data):
#print(column_number)
self.tableWidget.setItem(row_number, column_number, QTableWidgetItem(str(data)))
run()
#we have connected clicked signal of button with the selec_data method
self.verticalLayout.addWidget(self.tableWidget)
self.retranslateUi(Form)
QMetaObject.connectSlotsByName(Form)
#this is the method for selecting data
def retranslateUi(self, Form):
_translate = QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form"))