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
  [Tkinter] pressing the button arkiboys 2 233 Nov-17-2021, 02:08 PM
Last Post: arkiboys
  [Tkinter] Button 'command' Argument Confusion gw1500se 11 518 Nov-11-2021, 08:45 PM
Last Post: menator01
  button enabled only when all the inputs are filled cybertooth 5 476 Oct-22-2021, 10:10 PM
Last Post: deanhystad
  [Tkinter] Why does the image for the button not appear? finndude 4 325 Oct-21-2021, 06:41 PM
Last Post: deanhystad
  [PyQt] Button clicked not working catlessness 10 1,654 Oct-21-2021, 12:36 PM
Last Post: catlessness
  Creating a function interrupt button tkinter AnotherSam 2 500 Oct-07-2021, 02:56 PM
Last Post: AnotherSam
  [Tkinter] Have tkinter button toggle on and off a continuously running function AnotherSam 5 525 Oct-01-2021, 05:00 PM
Last Post: Yoriz
  How add button to certain TAB using TAB-index MacTommu 3 420 Sep-23-2021, 05:53 AM
Last Post: MacTommu
  [Tkinter] How to terminate a loop in python with button in GUI Joni_Engr 6 1,046 Sep-09-2021, 06:33 PM
Last Post: deanhystad
  [Tkinter] changing and getting value through button niski1996 2 445 Aug-24-2021, 04:44 PM
Last Post: niski1996

Forum Jump:

User Panel Messages

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