Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to check whether the windows are already open..
endla.ravi last edited by
im designing a Messenger,and more like a yahoo messenger
When a message comes at the client side,it should check whether the chat box pertaining to that user is already open or not.
If i had the instance with me,i would have checked it by any means.But the problem is chat boxes are created some where else.
Is there any way to check all the windows that are open in the program...
Thanks in advance..
giesbert last edited by
If you mean topLevel widgets, you can try "QApplication::topLevelWidgets()":http://doc.qt.nokia.com/4.7/qapplication.html#topLevelWidgets
goetz last edited by
You should have a "container class":http://doc.qt.nokia.com/latest/containers.html holding your chat windows. I'd suggest a "QHash":http://doc.qt.nokia.com/latest/qhash.html with the nickname as key and a pointer to the messenger window/widget as value.