Results 1 to 5 of 5

Thread: textChanged vs textEdited

  1. #1
    Join Date
    Sep 2007
    Location
    Sant'Elpidio a Mare, Italy
    Posts
    194
    Thanks
    54
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Question textChanged vs textEdited

    Hi everyone,

    it seems a stupid question, but I found no answer, even in this forum history, so...

    The question is: what is the difference between textChanged signal and textEdited signal for a QLineEdit?

    I read docs, but it just says that they are emitted when text changes for both of them. So?

    Thank you in advance
    --
    raccoon29

    "La mia vita finirà quando non vedrò più la gente ridere...non necessariamente alle mie battute "

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: textChanged vs textEdited

    textChanged() is emited whenever the contents of the widget changes whereas textEdited() is emited only when the user changes the text using mouse and keyboard (so it is not emitted when you call QLineEdit::setText()).

  3. The following 2 users say thank you to wysota for this useful post:

    Finrond (2nd April 2013), Raccoon29 (26th March 2008)

  4. #3
    Join Date
    Sep 2007
    Location
    Sant'Elpidio a Mare, Italy
    Posts
    194
    Thanks
    54
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: textChanged vs textEdited

    Thank you, now it has sense

    ...yes,but doc could spend two words for this...
    --
    raccoon29

    "La mia vita finirà quando non vedrò più la gente ridere...non necessariamente alle mie battute "

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: textChanged vs textEdited

    I personally think they are clear about it.

  6. #5
    Join Date
    Sep 2007
    Location
    Sant'Elpidio a Mare, Italy
    Posts
    194
    Thanks
    54
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Unhappy Re: textChanged vs textEdited

    Oh God, you are right, it is written below!

    ...sorry, I wasted a thread, I can't really understand why I missed it...
    sorry, again and thank you for your answers...
    --
    raccoon29

    "La mia vita finirà quando non vedrò più la gente ridere...non necessariamente alle mie battute "

Similar Threads

  1. Subclassing QLineEdit and suppress signal textChanged
    By Lykurg in forum Qt Programming
    Replies: 2
    Last Post: 15th February 2008, 17:40
  2. Slot to color background of line edit on textedited
    By tpf80 in forum Qt Programming
    Replies: 5
    Last Post: 21st June 2007, 09:02
  3. textChanged signal issue
    By chaosgeorge in forum Qt Programming
    Replies: 3
    Last Post: 9th November 2006, 00:32

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.