from
PyQt5.QtWidgets
import
*
from
PyQt5
import
QtCore
from
PyQt5
import
QtGui
import
sys
class
Window(QMainWindow):
def
__init__(
self
):
super
().__init__()
self
.setWindowTitle("Description")
self
.setGeometry(
0
,
0
,
400
,
300
)
self
.label_1
=
QLabel("Label",
self
)
self
.label_1.move(
100
,
100
)
self
.label_1.setStyleSheet("border:
1px
solid black;")
self
.label_1.setAccessibleDescription(
"This
is
description of label")
info
=
self
.label_1.accessibleDescription()
self
.label_2
=
QLabel(info,
self
)
self
.label_2.move(
100
,
130
)
self
.label_2.adjustSize()
self
.show()
App
=
QApplication(sys.argv)
window
=
Window()
sys.exit(App.
exec
())