Results 1 to 4 of 4

Thread: How to pass a member data from QMainWindow to QDialog

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Dec 2012
    Posts
    197
    Thanks
    25
    Thanked 41 Times in 33 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to pass a member data from QMainWindow to QDialog

    Pass it through the constructor when you create your dialog's instance, that's one way. Just rewrite your dialog's constructor to take whatever parameter you want.
    The other way could be by making a getter in your dialog and call it after you create your dialog and before you show it for example depending on your need.
    Good Luck.

  2. The following user says thank you to toufic.dbouk for this useful post:

    pollausen85 (10th October 2013)

Similar Threads

  1. Replies: 1
    Last Post: 26th March 2013, 02:04
  2. Replies: 0
    Last Post: 22nd September 2011, 10:31
  3. Replies: 1
    Last Post: 29th May 2011, 08:00
  4. Replies: 5
    Last Post: 1st March 2010, 15:55
  5. QDialog and QMainWindow Data Transfer
    By Ahmad in forum Qt Programming
    Replies: 12
    Last Post: 6th May 2007, 07:02

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.