How to access "textEdit" using "topLevelWidget()"?
Unsolved
Qt Creator and other tools
-
This is a repost, and I am hoping it will lead to
t he solution.Here is QDesigner view of the object GUI layout. My objective is to gain access to the first "tab" member "textEdit" using the object " top LevelWidget" member.
In pseudo code :
while top LevelWidget != QTextEdit
if found QTextEdit
append "TEST TEXT"My object is defined:
MainWindow_C_CODE_FORM *MWCCF = new MainWindow_C_CODE_FORM();
-
@AnneRanch
QTextEdit *textEdit = mainWindow->centralWidget()->findChild<QTextEdit *>(); if (textEdit) textEdt->append("TEST TEXT"); else qDebug() << "Did not find any QTextEdit";