How to create settings window using Qt
-
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) ?
-
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. -
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