How to create settings window using Qt
-
wrote on 2 Dec 2016, 05:05 last edited by A Former User 12 Feb 2016, 17:26
Hai
I want to create settings window for my application using Qt. The settings window is launched by clicking "Options" action in the menu item. I wanted to figure out how to open up a 2nd window from the main window. As well how the new window return the settings information back to main window. Is there any example for this.? And also How to set default language for the application by programming(not by qt designer) ?
-
wrote on 2 Dec 2016, 05:32 last edited by
You have to use QDialog to create option or preference dialog box.
here is a good example for you.
http://www.qtcentre.org/threads/56849-Learning-how-to-send-SIGNALS-from-a-QDialog-to-a-SLOT-QT5
In order to open 2nd window from main window, you may setup shortcut key or make a menu item on menubar. Connect shortcut or menu item with dialog box by Signal & Slot. -
wrote on 2 Dec 2016, 06:14 last edited by
Thanks for the reply :)
-
Hai
I want to create settings window for my application using Qt. The settings window is launched by clicking "Options" action in the menu item. I wanted to figure out how to open up a 2nd window from the main window. As well how the new window return the settings information back to main window. Is there any example for this.? And also How to set default language for the application by programming(not by qt designer) ?
@umadevi said in how to create settings window using Qt:
Hi- And also How to set default language for the application by programming(not by qt designer) ?
http://doc.qt.io/qt-5/internationalization.html
You must supply the translations for all your widgets.
http://doc.qt.io/qt-5/qtranslator.html#details
1/4