Results 1 to 4 of 4

Thread: Updating a QTableWidget through a Dialog

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Moscow, Russia
    Posts
    20
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: Updating a QTableWidget through a Dialog

    1: contactDialog dlg(this);
    2: if(dlg.exec() == QDialog::Accepted)
    3: dlg.leBedrijf->setText(item->text());
    You try to set some dialog properties in the string 3 (see quoted text) after the dialog is executed and closed (string 2) because the dialog is modal. Try the following:

    Qt Code:
    1. ContactDialog dlg(this);
    2. dlg.setSomeField(item->text());
    3. if (dlg.exec() == QDialog::Accepted) {
    4. // Do something
    5. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Posts
    115
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanked 1 Time in 1 Post

    Default Re: Updating a QTableWidget through a Dialog

    Thanks vitaly for your answer.
    The problem is solved.

Similar Threads

  1. Issue with Modelless dialog on Mac
    By Satyanarayana Chebrolu in forum Qt Programming
    Replies: 0
    Last Post: 24th February 2009, 10:10
  2. Replies: 9
    Last Post: 13th August 2008, 18:07
  3. QGraphicsView: Dialog Position Doubt
    By arjunasd in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2007, 17:48
  4. Problems updating a dialog
    By SkripT in forum Qt Programming
    Replies: 12
    Last Post: 1st April 2006, 10:17
  5. dialog box
    By Bahar in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 14:52

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.