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] How to terminate a loop in python with button in GUI Joni_Engr 6 227 Sep-09-2021, 06:33 PM
Last Post: deanhystad
  [Tkinter] changing and getting value through button niski1996 2 177 Aug-24-2021, 04:44 PM
Last Post: niski1996
  problem with radio button crook79 3 365 Aug-12-2021, 02:30 PM
Last Post: deanhystad
Exclamation [Tkinter] Anyone know what happened to my button? IgnacioMora23 35 2,237 Aug-12-2021, 05:26 AM
Last Post: IgnacioMora23
  [Tkinter] Make my button text update? Skata100 1 227 Aug-07-2021, 05:37 AM
Last Post: deanhystad
  [PyQt] Button clicked not working catlessness 9 618 Jul-30-2021, 07:00 PM
Last Post: deanhystad
  [Tkinter] image inside button rwahdan 4 430 Jul-12-2021, 08:49 PM
Last Post: deanhystad
  [Tkinter] Button error Tyrel 2 323 Jun-20-2021, 07:21 AM
Last Post: Tyrel
  tkinter showing image in button rwahdan 3 665 Jun-16-2021, 06:08 AM
Last Post: Yoriz
  [Kivy] Acces atributes from a button defined in a class inside the .kv Tomli 2 415 Jun-10-2021, 01:05 AM
Last Post: Tomli

Forum Jump:

User Panel Messages

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