You could keep the windows in a list or map so you can always access any of them.
The focus tracking could either be done by the sub windows and signalled to the main window or through an event filter.
Cheers,
_
You could keep the windows in a list or map so you can always access any of them.
The focus tracking could either be done by the sub windows and signalled to the main window or through an event filter.
Cheers,
_
Thanks
Though, How do I create a List of Windows
Also in the sub window, where do I check to see its status (How do I create a slot on a "window" to see if focus == true);
If possible provide me with an example or link to a similar example
Kind Regards
Qt Code:
QList<miniFormClass*> windows;To copy to clipboard, switch view to plain text mode
Windows don't have focus, individual input widgets do.
See stampede's suggestion of connecting to the application's focusChanged() signal.
Cheers,
_
2lights (16th January 2014)
Apologies for the late reply....
this is what i need...
From the sub-window created when a button is pressed(Creating several sub-windows based on number of times Button is pressed)
I Added a check-box on the subwindow
That when checked it should emit a signal to the main window(Signifying focus status).
Creating the signal is no problem
I have a problem defining the SLOT
Qt Code:
//this is in the main Window .cpp //The signal is emited from a sub-window (the sub-window is only created when button is pressed) connect(this, SIGNAL(checked()), this, SLOT(doSomething)); errorTo copy to clipboard, switch view to plain text mode
How do i create the slot in mainWindow to pick up the signal from sub-window
//will pass certain variables from sub-window to main-window via the signal and slot mechanism
Many thanks
Last edited by 2lights; 16th January 2014 at 09:26.
Bookmarks