Results 1 to 4 of 4

Thread: How to set a value from current widget to lineEdit on dialog?

  1. #1
    Join Date
    Mar 2009
    Posts
    104
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default How to set a value from current widget to lineEdit on dialog?

    Hi,

    I have QWidget and QDialog.
    The QWidget has a button and label.
    I want when i click the button to open the dialog and inside to be written the value from the QWidget's label.
    I have tried to make it with emmiting signal, but when i open the dialog the signal is already emitted.

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to set a value from current widget to lineEdit on dialog?

    A demo app?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: How to set a value from current widget to lineEdit on dialog?

    Add a QString parameter to the dialog constructor, or code a member function that set the text and call that function before you show (or exec) the dialog.

  4. #4
    Join Date
    Mar 2009
    Posts
    104
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: How to set a value from current widget to lineEdit on dialog?

    Thank you!

Similar Threads

  1. Replies: 4
    Last Post: 29th September 2010, 20:21
  2. Finding the 'current' dialog
    By zarkzervo in forum Qt Programming
    Replies: 7
    Last Post: 24th April 2009, 09:20
  3. lineEdit + comboBox behaviour widget
    By maverick_pol in forum Qt Programming
    Replies: 3
    Last Post: 22nd April 2009, 12:34
  4. read and write content of lineedit widget in Other Form
    By validator in forum Qt Programming
    Replies: 1
    Last Post: 25th April 2008, 16:07
  5. lineedit fill in new dialog window.
    By mkarakaplan in forum Newbie
    Replies: 1
    Last Post: 7th October 2007, 08:00

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.