Results 1 to 3 of 3

Thread: How to communicate between two forms

  1. #1
    Join Date
    Oct 2008
    Location
    Thodupuzha, a small town in kerala
    Posts
    31
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default How to communicate between two forms

    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.

    Jayanth.S

  2. #2
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to communicate between two forms

    create two seperate classes that accesses these forms..in the destructor of one class, call the function u r looking to execute..

  3. #3
    Join Date
    Oct 2008
    Location
    Thodupuzha, a small town in kerala
    Posts
    31
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to communicate between two forms

    Hi,

    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..


    Jayanth.S

Similar Threads

  1. Share a variable between forms
    By sepehr in forum Qt Programming
    Replies: 4
    Last Post: 29th January 2009, 07:05
  2. Handling multiple forms
    By msmihai in forum Qt Programming
    Replies: 4
    Last Post: 6th December 2008, 13:41
  3. using functions in different forms
    By vishnu5 in forum General Programming
    Replies: 1
    Last Post: 4th February 2008, 19:37
  4. Custom shaped forms and controls
    By AlbertGoodwill in forum Qt Programming
    Replies: 1
    Last Post: 19th October 2007, 06:35
  5. Communication 2 Forms
    By cristiano in forum Qt Programming
    Replies: 1
    Last Post: 29th September 2006, 06:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.