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] TKinter Remove Button Frame Nu2Python 8 802 Jan-16-2024, 06:44 PM
Last Post: rob101
  tkinter - touchscreen, push the button like click the mouse John64 5 739 Jan-06-2024, 03:45 PM
Last Post: deanhystad
  [Tkinter] Search data in treeview without search button TomasSanchexx 3 1,525 Aug-12-2023, 03:17 AM
Last Post: deanhystad
  Centering and adding a push button to a grid window, TKinter Edward_ 15 4,369 May-25-2023, 07:37 PM
Last Post: deanhystad
  [Tkinter] Is there a way to determine if a radio button has been selected? TWB 5 4,740 Jan-31-2023, 09:44 AM
Last Post: Vadanane
  [Tkinter] [split] I want to add a code to the "Save" button to save the data entered LOO 1 1,881 Jan-23-2023, 05:31 PM
Last Post: deanhystad
  [Tkinter] Trying to add data into a shelf from a submit button TWB 8 1,808 Jan-06-2023, 11:30 PM
Last Post: TWB
  [Tkinter] how to make label or button not visible with the place method? nowayj63 2 2,632 Jan-03-2023, 06:29 PM
Last Post: Yoriz
Question [Tkinter] How to make split button? teknixstuff 2 1,017 Jan-03-2023, 06:21 PM
Last Post: Yoriz
  [PyQt] start and stop websocket-client using button GUI zinho 5 2,371 Dec-27-2022, 06:06 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