PyQT Buttons do not get focus on first click - python

I am having a problem with all the QPushButton buttons in my PyQt application.
For some reason, even if the window has focus, the first click on a button will not register (no 'click affect' or button action occurs). Following this, as though it now has focus, I can click the button, or any other button, on the first go. As soon as the focus changes to another non-button widget, again none of the buttons will click on the first attempt.

Update:
This issue was present for maybe 4 months. After continuing to try everything I could find online and nothing working, I gave up. After about 2 weeks, the issue randomly disappeared.
I have not made any intentional changes to package versions, but it's possible the issue was fixed in a minor version update of PySide. It has now been good for a few weeks so I am convinced it is solved :)
The version of PySide I am currently using is 5.15.1, I'm not sure if this is the same as before but can confirm the issue is not present here

Related

WxPython exit button doesn´t always works

I am using a code designed by another person in MAC OS. I am using Windows instead and have slightly modified it, but the problem comes when using the GUI that is created.
I have already dealt with a similar issue with a slider. Once I pressed the slider, I couldn´t release it or press another button. I was forced to quit the GUI and start again. I solved it by changing the event command from EVT_COMMAND_SCROLL to EVT_COMMAND_SCROLL_THUMBTRACK. However I did not understand why it worked in MAC OS and does not work in Windows.
Now, I want to close the GUI with the typical cross inside the red button in the right corner of the window. I can do it if it is the first order I do in the GUI. If I first press any button or slider, the exit button does not work.
It made me consider if a major problem is hidden in the code which I am not seeing. I am new at wxPython, which is the module used in the code.
I just ask for your opinion and hope it is a basic error.
Thanks very much

Tkinter GUI buttons become invisible after creating app using Py2App

I built a small GUI using Tkinter. The GUI features, among some other elements, three buttons. These buttons serve to open a dystem dialog and select certain data-files etc. One of the three buttons is a 'Go' button that runs the underlying data-processing.
When running the .py script the GUI works fine. However, after creating a developer app in alias mode using Py2App the buttons have become invisible! They're still there and usable, but invisible until interacted with.
How can I prevent this from happening?
I was stuck in your exact situation for quite some time. When I ran my tkinter script, it worked perfectly and all the buttons showed up, but once I packaged it, the buttons stopped showing up (They were still there but you couldn't see them). After a long time of trying random things, I found out how to make the buttons and their text show up again. Simply resize the window. Even a difference of 1 or 2 pixels does the trick. I have not yet found a way to PREVENT this issue, but at least this makes the app look right.
Please reply if you figure out a solution to prevent this!
Good Luck!

Kivy module switch widget pressed anywhere

I have a kivy file with several widgets, one of them is a switch.
The problem is that wherever I press on the screen, it flips the switch.
I have 2 other widgets - one of them is a check-box and another is radio-buttons, which also have some problems and I think they are occuring because of the switch.
The problem is that in order to press them I need to press on a different part of the screen and not on the widget itself.
Any help would be appreciated.
UPDATE
I am using Windows only for development.
You probably have a switch that is larger than you expect. From the documentation of the switch: "The entire widget is active, not just the part with graphics. As long as you swipe over the widget’s bounding box, it will work." I would try changing the background of the switch to see how big it really is.

easygui CLOSE button (on top right of window) not functioning

i have created a chat system in python, using easygui for graphical user interface.
there are minimize,maximize and close button on top right of window,but the close button is not functioning at all.i just can use the exit button which i created to close the application. i had some search and found there is a problem with easygui, so is it totally impossible to fix this problem? or how can i remove that close button from top right as there is no use for it. its final year project and i'm afraid my advisor and supervisor want try that button and i lose mark because of no function
is there anyway to fix it or at least remove that close button?
This is likely past the due date for your assignment...sorry. But, that was a known limitation of easygui. An up-to-date version with a fix for that will be released soon. If you can't wait, you can take a look at it in development form: https://github.com/robertlugg/easygui

Popup Dialog in Tkinter/Python

I need to add a popup dialog box on my GUI.
So, when ever I hover my mouse over a label, it should be able to show a popup( Like the type we get while hovering over a file in windows).
It should also disappear as soon i move away the mouse.
To start with, I am not even sure which module or class to use. I tried menu, but the results are not what i expected.
I also tried to learn tkCommonDialog, but couldn't understand it properly.
Please Advice!
The little popup window is called a tooltip.
This post may be relevant: http://bytes.com/topic/python/answers/505848-tkinter-button-overrelief
Take a look at the Balloon widget in the Tix package. I think it is just what you are looking for.

Categories

Resources