QWidget * QTabWidget::widget ( int index )
is the droid you are looking for ;)
How to get widget from QTabWidget?
-
01-06-2022 - |
Pregunta
I'm writing a simple text editor and using QTabWidget in it. For some QActon from QMenu I need to work with some widget from QTabWidget. QTabWidget::widget() return QWidget, but I need QTextEdit, which I added to QTabWidget using addTab(). How do I get a QTextEdit from QTabWidget?
QTextEdit *textEdit = new QTextEdit;
QTabWidget *tabWidget = new QTabWidget;
tabWidget->addTab(textEdit, "text_edit");
//How to get textEdit by index or somethin from tabWidget?
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow