from
PyQt5.QtWidgets
import
*
from
PyQt5
import
QtCore, QtGui
from
PyQt5.QtGui
import
*
from
PyQt5.QtCore
import
*
import
sys
class
Window(QMainWindow):
def
__init__(
self
):
super
().__init__()
self
.setWindowTitle(
"Python "
)
self
.setGeometry(
100
,
100
,
600
,
400
)
self
.UiComponents()
self
.show()
def
UiComponents(
self
):
checkbox
=
QCheckBox(
'Geek ?'
,
self
)
checkbox.setTristate(
True
)
checkbox.setGeometry(
200
,
150
,
100
,
40
)
checkbox.setStyleSheet(
"QCheckBox"
"{"
"border : 2px solid black;"
"padding : 10px;"
"}"
"QCheckBox::indicator"
"{"
"border : 2px solid black;"
"width : 20px;"
"height : 20px;"
"border-top-left-radius :10px;"
"border-top-right-radius : 1px; "
"border-bottom-left-radius : 1px; "
"border-bottom-right-radius : 11px"
"}"
)
App
=
QApplication(sys.argv)
window
=
Window()
sys.exit(App.
exec
())