Results 1 to 2 of 2

Thread: Signal problem in Qline Edit

  1. #1
    Join Date
    Mar 2006
    Posts
    21
    Qt products
    Qt3
    Platforms
    Unix/X11

    Question Signal problem in Qline Edit

    hi guys am new to qt and facing problem in signal handling with Qline Edit CLASS

    connect(Ok,SIGNAL(clicked()),UserName,SLOT( clear()));

    this works but if i want to accept user name from UserName lineedit box then what can i do so that i will get the text user typed in UserName lineedit box

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Signal problem in Qline Edit

    Why do you clear the line edit straight when ok button is clicked?
    Maybe you should create a custom slot, which first checks the content of the line edit
    From docs:
    QString QLineEdit::text () const
    Returns the line edit's text. See the "text" property for details.
    and then clears the line edit afterwards.
    J-P Nurmi

Similar Threads

  1. QLineEdit - lostFocus signal problem
    By Enygma in forum Qt Programming
    Replies: 6
    Last Post: 17th June 2010, 20:52
  2. Line Edit Controll problem
    By mansoorulhaq in forum Qt Programming
    Replies: 5
    Last Post: 31st October 2007, 08:33
  3. Problem emitting signal from a static function
    By Valheru in forum Qt Programming
    Replies: 21
    Last Post: 12th June 2007, 14:48
  4. Replies: 3
    Last Post: 15th April 2007, 19:16
  5. Problem with Signal and Slots
    By Kapil in forum Installation and Deployment
    Replies: 2
    Last Post: 10th February 2006, 08:51

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.