Results 1 to 5 of 5

Thread: Get text from one dialog and do something with it to the other.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Get text from one dialog and do something with it to the other.

    Let's say that into the main window you have a lineedit, how can you open a dialog that displays the text of this lineedit?

    example attached.

    Thanks in advance for any answers

    display_from_other_dialog.zip
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Get text from one dialog and do something with it to the other.

    Either pass the value into the the_other_Dialog constructor or create a public method in the_other_Dialog that accepts a value to display.

  3. The following user says thank you to ChrisW67 for this useful post:

    hakermania (8th January 2011)

  4. #3
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Get text from one dialog and do something with it to the other.

    Hey, thanks for the reply.

    Once being in the beginners' section, can you please point me somewhere that explains how to do one of these?
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  5. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Get text from one dialog and do something with it to the other.

    google for getter and setter methods. Also read about parameters: http://www.cplusplus.com/doc/tutorial/functions2/. It is all about basic c++ stuff.

  6. The following user says thank you to Lykurg for this useful post:

    hakermania (8th January 2011)

Similar Threads

  1. Replies: 0
    Last Post: 5th October 2010, 07:41
  2. closing child dialog closes parent dialog
    By sparticus_37 in forum Newbie
    Replies: 2
    Last Post: 28th May 2010, 19:46
  3. How to blur parent dialog when child dialog is displayed
    By abhilashajha in forum Qt Programming
    Replies: 4
    Last Post: 10th June 2009, 13:01
  4. Replies: 1
    Last Post: 3rd September 2008, 14:16
  5. Replies: 11
    Last Post: 5th June 2007, 09:06

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.