setting up a GUI.
-
Hello everybody,
I want to ask some help how to start designing a Graphic User Interface. I’m quite new with QT and picking out the right information from the internet is not easy.
The user interface I want to design contains buttons, dials and other graphical widgets.
I want to setup it as follow:
One root/parent window. Inside this root window I want to make different pages so that I can switch between the different pages. I want to fill the different pages with different widgets. The root window contains the buttons for switching the pages and control other certain processes.
The plan is to design different qml components in different qml files, so that each component does have his own qml file. The plan is to initialize the pages on C++ side. That means C++ decide where and on which page the widgets/components will be placed.For structuring the C++ program, I made already a global plan in my head:
-One main class;
In this class I create the parent window.
-one init/polling class;
This class initialize the pages. It also starts a Qtimer and uses this timer to update the dials with fresh data. Data is received from a bus-system.
-signal and slot classes for the widgets.Questions:
-
Is qqmlcomponents the right manner to create the widgets as childs;
-
How do I set-up the parent and child configuration. How can i interact with the different widget classes;
-
I only have to pass data from c++ to the qml engine. Is a signal, slot class the best way?
-
?
Thanks in advance for your help.
p.s. I'm using qt 5 on a linux desktop.
-
-
Hi and welcome to devnet,
IMO your approach is not correct.
You're asking how to design the whole application but your Qt knowledge is very elementary.I suggest to start with simpler task and learn how to build complex UIs step by step.
Have a look to Qt tutorials and also you can read this
-
Thank you mcosta. I didn’t found this complete tutorial yet.