This should be a stupid question. I am just curious and could not find the answer on my own.
E.g. I define in PyQt5 some widgets:
self.lbl = QLabel("label")
self.btn = QPushButton("click")
self.txt = QLineEdit("text")
Is there any method to detect what kind of widget the self.lbl
, self.btn
, or self.txt
are?
I could imagine: by detecting the widget type, the input is self.lbl
, the output should be QLabel
... Or something like this.
I have only found the isWidgetType() method. But it is not what I want to have.