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
):
bar1
=
QProgressBar(
self
)
bar1.setGeometry(
200
,
100
,
200
,
30
)
bar1.setValue(
70
)
bar1.setAlignment(Qt.AlignCenter)
bar1.setFont(QFont(
'Arial'
,
15
))
bar2
=
QProgressBar(
self
)
bar2.setGeometry(
200
,
200
,
200
,
30
)
bar2.setValue(
20
)
bar2.setFormat(
"Hello Geeks"
)
bar2.setAlignment(Qt.AlignCenter)
bar2.setFont(QFont(
'Times'
,
7
))
App
=
QApplication(sys.argv)
window
=
Window()
sys.exit(App.
exec
())