Results 1 to 4 of 4

Thread: Data from dialog to form

  1. #1
    Join Date
    Apr 2010
    Location
    Rzeszów \ Poland
    Posts
    26
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Data from dialog to form

    Hello.
    I have a problem. I have two windows: form and dialog.
    Form include tableview (model-based).
    Dialog include lineEdit's fields and button.

    I want to send information from dialog box to model (in main window).
    For example, in dialog box Name and Surname to header in my model.

    Thanks

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Data from dialog to form

    Read about signals and slots

  3. #3
    Join Date
    Apr 2010
    Location
    Rzeszów \ Poland
    Posts
    26
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Data from dialog to form

    Ok. I had read.
    But I still don't know how to send value of variable x from Dialog box to variable y in MainWindow form.
    I try this:
    Qt Code:
    1. connect(m_ui->pushButton,SIGNAL(clicked()),?,?);
    To copy to clipboard, switch view to plain text mode 
    but I don't know what I must enter instead "?".

    I try also it:
    Qt Code:
    1. MainWindow *dupa = new MainWindow;
    2. QString temp = m_ui->lineEdit->text();
    3. dupa->?
    To copy to clipboard, switch view to plain text mode 

    Please and thanks for help ;-)

  4. #4
    Join Date
    Oct 2007
    Location
    Grenoble, France
    Posts
    80
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Data from dialog to form

    First you could at least try to use Assistant and use "search" to look for similar threads here.

    There's lot of ways of doing this, depending of what you want to do. For example you can use signals/slots or simply setter/getter methods. Try this link and/or use the search engine.

    And please don't use words like "dupa" and it's "more polite" friends in your source. Some of us speak this language, if you didn't know.
    You have to run a level 3 diagnostic.

    Ashes to ashes, Qt to Qt ( wysota )

Similar Threads

  1. Qhttp:Post() - multipart/form-data
    By arunredi in forum Newbie
    Replies: 5
    Last Post: 20th September 2011, 20:02
  2. Question on MIME multipart/form-data
    By dannycxh in forum Qt Programming
    Replies: 0
    Last Post: 2nd March 2010, 08:08
  3. Resizing dialog with form layout
    By elizabeth.h1 in forum Qt Programming
    Replies: 2
    Last Post: 30th August 2009, 19:58
  4. How to Switch the dialog Form
    By Smiler in forum Qt Programming
    Replies: 1
    Last Post: 28th August 2009, 11:36
  5. TreeView used in Qt Designer New Form dialog?
    By Bitruder in forum Qt Programming
    Replies: 2
    Last Post: 6th May 2009, 21:40

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.