Results 1 to 3 of 3

Thread: How should I return data (string, int) after a QDialog is close?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Posts
    132
    Thanks
    67
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default How should I return data (string, int) after a QDialog is close?

    Hi!

    How should I return data (string, int) after a QDialog is close?

    Is this correct?

    Qt Code:
    1. CNewLevelDialog dialog2(this);
    2. QString string; int number;
    3. if (dialog2.exec()==QDialog::Accepted) {
    4. string= dialog2->getstring();
    5. number= string= dialog2->getnumbre();
    6. }
    To copy to clipboard, switch view to plain text mode 

    Thanks!
    Last edited by wysota; 27th June 2009 at 20:09. Reason: missing [code] tags

Similar Threads

  1. QDialog with Close, Maximize and Context Help Buttons
    By mclark in forum Qt Programming
    Replies: 7
    Last Post: 1st May 2020, 16:53
  2. error with QList with a class
    By john_god in forum Newbie
    Replies: 7
    Last Post: 12th January 2009, 21:48
  3. QTableView performances
    By miraks in forum Qt Programming
    Replies: 18
    Last Post: 1st December 2008, 10:25
  4. How to return a lot of data from a QDialog
    By Morea in forum Qt Programming
    Replies: 2
    Last Post: 20th October 2008, 12:10
  5. QDialog not showing close button on Mac
    By manojmka in forum Qt Programming
    Replies: 2
    Last Post: 17th September 2008, 12:56

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.