Qt 6.12 LTS is out! See what's new in the release
blog
Accessing elements of QWizardPage created by QWizard in QT Designer
General and Desktop
6
Posts
3
Posters
2.9k
Views
1
Watching
-
I created a QWizard[call it MyQWizard] and added some pages into it QWizardPage [MyQWizardPage-1, MyQWizardPage-2]
I added comboBox on MyQWizardPage-1 and need to access fit form my code. How can I do that?
-
Hi,
What would you like to do with that combo box ?
-
Thanks for your reply. I need to access the selected value from the combobox.
-
Where do you want to access that value ?
From another page ?
-
Assuming that your fourth page is wiz4 of type QWizardPage. Items are added to page as children. You can do the following to get it.
QComboBox *box1 = wiz4->findChild<QComboBox*>(); box1->addItem("tesmai4"); -
I wouldn't recommend findChild for that use case. A properly written widget can provide the needed information.