-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenTeam.py
65 lines (56 loc) · 2.18 KB
/
OpenTeam.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
59
60
61
62
63
64
65
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'open.ui'
#
# Created by: PyQt5 UI code generator 5.14.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
import sqlite3
match=sqlite3.connect('Fantasy.db')
matchcur=match.cursor()
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(368, 274)
self.label = QtWidgets.QLabel(Dialog)
self.label.setGeometry(QtCore.QRect(80, 30, 299, 40))
font = QtGui.QFont()
font.setFamily("Segoe Print")
font.setPointSize(14)
font.setBold(True)
font.setWeight(75)
self.label.setFont(font)
self.label.setObjectName("label")
self.openbtn = QtWidgets.QPushButton(Dialog)
self.openbtn.setGeometry(QtCore.QRect(120, 160, 93, 49))
font = QtGui.QFont()
font.setFamily("Microsoft Sans Serif")
font.setPointSize(10)
font.setBold(False)
font.setItalic(False)
font.setWeight(50)
self.openbtn.setFont(font)
self.openbtn.setStyleSheet("font: 10pt \"Microsoft Sans Serif\";")
self.openbtn.setObjectName("openbtn")
self.open_cb = QtWidgets.QComboBox(Dialog)
self.open_cb.setGeometry(QtCore.QRect(70, 100, 211, 31))
self.open_cb.setObjectName("open_cb")
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
teams= matchcur.execute("SELECT DISTINCT Name FROM Teams;") # fetching team names
y= teams.fetchall()
for i in y:
self.open_cb.addItem(i[0])
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
self.label.setText(_translate("Dialog", "Select Team to Open"))
self.openbtn.setText(_translate("Dialog", "Open"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Dialog = QtWidgets.QDialog()
ui = Ui_Dialog()
ui.setupUi(Dialog)
Dialog.show()
sys.exit(app.exec_())