![]() QSettings is probably the best bet for storing settings. When in Qt Creator > Welcome (tab) > Examples, the best one for a complex settings dialog is probably: If (ntains(searchKeyWord, Qt::CaseInsensitive))įinding the rest of the components of the original dialog may take some time, but it is doable. What I would like to do is to pass mainWindow this structure before the dialog closes, when I click the OK button. On this dialogue window I select several settings which get stored as QStrings in a settings struct. ![]() QMutableStringListIterator it(m_keywords) įoreach (const QString &keyword, m_keywords) I have an application where the mainWindow is calling a QDialog with ok/cancel buttons. 4 - The dialog then opens and the MainWindow is hidden. 3 - Your method creates a QDialog and connects its signals to this MainWindow::show () method. 2 - Because you have overridden this method by implementing MainWindow::show (), your method gets called instead. bool Core::IOptionsPage::matches(const QString &searchKeyWord) constįoreach (const QLabel *label, widget->findChildren())įoreach (const QCheckBox *checkbox, widget->findChildren())įoreach (const QPushButton *pushButton, widget->findChildren())įoreach (const QGroupBox *groupBox, widget->findChildren()) 1 - You (or the Qt framework) call QMainWindow::show (). The search box uses an index the all the titles/labels of the children of each options page that gets added. The ioptionspage.cpp has all the comments explaining the purpose of the different slots.īasically for Qt Creators options page, it has an interface that is used by several different sub modules.Ĭlass CORE_EXPORT IOptionsPage : public QObject It ends up that the source related to the nice options page in Qt Creator uses the IOptionsPage as the base class for any of the pages that show up in the Options dialog. But because Qt Creator is such a large and complex project, it can be overwhelming finding its sub parts. Qt Creator has it source code both in Gitorious and in GitHub.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |