PDA

View Full Version : Help - 1 Separate Window to Rule them all, Ideas please



2lights
11th July 2013, 10:12
Qt colleagues;)

please inform me, how to:
1) create more than 1 "window", in the same application
2) use 1 window as a "control window" to call other windows
ie. each window does something else according to selection from the "controlling window"
3) Hence connecting connecting a "Push Button click" to open a new different window.

Is it possible, to create all the windows in qt Creator(drag and drop)

Ideas Welcome:D

Thanks

ChrisW67
11th July 2013, 11:30
1) create more than 1 "window", in the same application
The same way you created the first one. Create an instance of a QWidget and show() it.

2) use 1 window as a "control window" to call other windows. ie. each window does something else according to selection from the "controlling window"
"Call other windows" is vague. You can connect signals in one object to to slots in another, or hold a pointer to another object and call functions directly...

3) Hence connecting connecting a "Push Button click" to open a new different window.
Connect the clicked() signal to a slot that creates another instance of a QWidget and calls show().

Is it possible, to create all the windows in qt Creator(drag and drop)
Yes, you can design as many different layouts of widgets as you want in Designer.

It is also possible to type a sentence without unnecessary highlighting ;)