Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Push button clicked event executed simultaneously with returnedPressed() event of a LineEdit - *SOLVED*

Push button clicked event executed simultaneously with returnedPressed() event of a LineEdit - *SOLVED*

Scheduled Pinned Locked Moved General and Desktop
push buttonline editreturnpressedclicked
1 Posts 1 Posters 894 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Raim
    wrote on 1 May 2015, 15:27 last edited by Raim 5 Jan 2015, 19:37
    #1

    Hello, everyone.

    I've made a form with two QListWidgets, a Line Edit field, and a Push Button. Using the returnPressed() event from the LineEdit, I add items to the first QListWidget; afterwards, I should use the button to trim out any duplicates and add the new list to the second QListWidget. Problem is, everytime I press Enter in the LineEdit field, the clicked() event of the button is also executed. I see no reason for this to happen, and if anyone might shed light for me on this, it'd be great.

    Thanks.

    EDIT: I know now why this problem happens. It appears when I press the Enter key it also presses the first available push button. Seems unnecessary to me, but I worked around with a switch bool variable.

    1 Reply Last reply
    0

    1/1

    1 May 2015, 15:27

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved