-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreferences.py
executable file
·43 lines (32 loc) · 1.05 KB
/
preferences.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
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
import sys
class Preferences(QDialog):
checkboxsig=pyqtSignal(bool)
def __init__(self,parent=None,showToolbar=True):
super(Preferences, self).__init__(parent)
self.resize(100,200)
self.setWindowTitle("Preferences")
self.checkBox=QCheckBox("Show main toolbar")
self.checkBox.setChecked(showToolbar)
self.closeBtn=QPushButton("Close")
layout=QVBoxLayout()
layout.addWidget(self.checkBox)
layout.addWidget(self.closeBtn)
self.setLayout(layout)
self.closeBtn.clicked.connect(self.close)
self.checkBox.stateChanged.connect(self.checkBoxStateChanged)
#self.checkboxsig.connect(self.deneme)
def checkBoxStateChanged(self):
self.checkboxsig.emit(self.checkBox.isChecked())
def deneme(self,param):
print("signal ok")
print(param)
#
# if __name__ == '__main__':
# app=QApplication(sys.argv)
#
# form=Preferences()
#
# form.show()
# sys.exit(app.exec_())