Work with widgets inside Qtabwidget

249 Views Asked by At

I see variant how program can work with QWidget,for example QLabel,QEdit,etc on C++. But i don't understand how can i work with other widgets on tab of tabwidget if i write programs with python & pyside?

I see variant with metaobject,read about variant with QObject::child,but i don't know right way for solving problem on python. I see variant with qobject_cast,but this function specific for C++ as i think. Sample code on C++:

try:

QTextEdit* edit = qobject_cast<QTextEdit*>(tabWidget->widget(index));  
1

There are 1 best solutions below

0
On

Well, I am not an expert of python, but did you try to use this:

yourObject = tabWidget.widget(index)

I guess it works with any type of object.