Results 1 to 2 of 2

Thread: how to send variable from Dialog class to main window class?

  1. #1
    Join Date
    Oct 2011
    Posts
    160
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default how to send variable from Dialog class to main window class?

    Hi all,
    I have one main window class and another Dialog class....
    I'm calling Dialog from Main window by creating pointer as shown below....


    Dialog *d= new Dialog(this);
    d->show();


    and performing all the operation in Dialog(which actually creates a creates and updates a table widget and then displays in the Dialog)
    But i want to Display that table widget inside the Main window...
    Please give me some hint how can i do that?


    My try:
    after updating table i'm emitting a signal and that signal is used in Main window to display the table, but displaying table program crashes......

  2. #2
    Join Date
    Oct 2011
    Posts
    160
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to send variable from Dialog class to main window class?

    Its ok guys...i got it....
    Did this using signals and slots
    Last edited by aurora; 20th January 2012 at 06:40.

Similar Threads

  1. Replies: 4
    Last Post: 23rd August 2011, 22:53
  2. Replies: 0
    Last Post: 8th March 2011, 23:08
  3. How to declare global variable outside a class?
    By babygal in forum Qt Programming
    Replies: 2
    Last Post: 26th August 2010, 09:35
  4. Replies: 2
    Last Post: 4th August 2010, 20:10
  5. Replies: 4
    Last Post: 26th June 2007, 20:19

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.