Python Forum
[PyQt] Avoid clicked event from button when button is not physically selected and clicked
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] Avoid clicked event from button when button is not physically selected and clicked
#1
I have a GUI with several buttons, line-edits and combo-boxes.
When I load this GUI and select a line-edit or combo-box to change input, it triggers the 'add' button on hitting enter.
This seems to be caused by the 'add' button being active somehow (blue outline around the button).

How can I remove this trigger when hitting enter in a line-edit or any edit field?

Attached Files

Thumbnail(s)
   
Reply
#2
This is not normal behavior. When clicking on a line edit or combo box widget the selected widget should take focus from the add button (no blue box around Add). I have no way of knowing why this is not working without seeing the code.
Reply
#3
(Apr-20-2020, 01:21 PM)deanhystad Wrote: This is not normal behavior. When clicking on a line edit or combo box widget the selected widget should take focus from the add button (no blue box around Add). I have no way of knowing why this is not working without seeing the code.

Ok, unfortunately I can't disclose the code. I made a workaround by setting each button to receive no focus at all.
This for now avoids the problem.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Creating a function interrupt button tkinter AnotherSam 2 151 Oct-07-2021, 02:56 PM
Last Post: AnotherSam
  [Tkinter] Have tkinter button toggle on and off a continuously running function AnotherSam 5 236 Oct-01-2021, 05:00 PM
Last Post: Yoriz
  How add button to certain TAB using TAB-index MacTommu 3 219 Sep-23-2021, 05:53 AM
Last Post: MacTommu
  [Tkinter] How to terminate a loop in python with button in GUI Joni_Engr 6 455 Sep-09-2021, 06:33 PM
Last Post: deanhystad
  [Tkinter] changing and getting value through button niski1996 2 265 Aug-24-2021, 04:44 PM
Last Post: niski1996
  problem with radio button crook79 3 486 Aug-12-2021, 02:30 PM
Last Post: deanhystad
Exclamation [Tkinter] Anyone know what happened to my button? IgnacioMora23 35 2,677 Aug-12-2021, 05:26 AM
Last Post: IgnacioMora23
  [Tkinter] Make my button text update? Skata100 1 308 Aug-07-2021, 05:37 AM
Last Post: deanhystad
  [PyQt] Button clicked not working catlessness 9 899 Jul-30-2021, 07:00 PM
Last Post: deanhystad
  [Tkinter] image inside button rwahdan 4 581 Jul-12-2021, 08:49 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020