View Full Version : How to communicate between two forms

7th April 2009, 07:54
Hi friends,

I am trying to do a C IDE using QT 3.3 . Can I communicate between two forms. I want to send a signal to one form when user clicked a pushbutton in other form. If that is not possible can I connect the destruction of one form to other form . What i meant is that a function should exicute in one form when other form is destroyed. I think I have given enough details (my english is not that good). Hope anyone can help me.


7th April 2009, 08:02
create two seperate classes that accesses these forms..in the destructor of one class, call the function u r looking to execute..

7th April 2009, 08:17

Thanks talk2amulya for the quick reply.. but I didnt understand what you are saying . What I understood that I have to create two more classes (I already have two , one for each form). Each of these new classes can access both the parent classes. So totally I have 4 classes and I have to work with my new classes rather than the old two. Is my reasoning is correct ?

Note : In the meantime I somewhat achieved my needs using an extern variable(flag is the correct word) and a QTimer which checks for these flag every 0.1 seconds. Not good c++ style of thinking but it seems to be working..