PyInstaller macOS issue: QCombobox not refreshing

I am packaging a python script and I have the following code which correctly updates and selects the first index in one packaging environment, but doesn’t in another. Unfortunately that environment where the code works as expected fails for some other obscure reason.

It’s not the end of the world as on seeing a blank Combobox the user can make a selection, however it would be nice to have some code that worked correctly in all environments!

All wisdom/ideas/thoughts/inspiration gratefully accepted!

connections = SerialPorts()
ports = connections.available()
# clear & then populate combobox with ports,
# from which the client can choose.

After rebuilding the environment from scratch I concluded that this issue is due to the unresponsiveness of Python Applications running in the distribution environment create by the PyInstallation process.

The issue of QCombobox (plus all other widgets) not being update is due to the GUI not redrawing itself. If the application is forced to redraw itself, perhaps by minimising and then selecting, the QCombobox is redrawn correctly. It’s as if QApplication.exec isn’t being permitted to process drawing events.

All wisdom/ideas/thoughts/inspiration gratefully accepted!

Sorry, I have no solution BUT want to check if my problem is the same as yours.

I’m VERY new to Python and coding but am working hard to get up to speed. I followed some PyQt5 tuts online and where text (labels, fields) and images (Pixmap within labels) need to update on events…they simply don’t, until I click back on my IDE (PyCharm) window OR my system terminal. I’m running files in two environments (system and virtualenv) with same results.

I even tried samples that came with Martin’s book and I am getting the same redraw issues, at least thats what I think it is as values do get passed on the event.

I’m running Python 3.9 on Mac Mojave 10.14.6

Hi Steve, sorry for the very tardy response. I hope you’ve fixed your issue now.
I used Anaconda, mainly for legacy reasons, however when it works! it’s very convenient. However it is quite heavy weight and frequently goes off into its own world!

I had two conda environments one which exhibited the issues I described and the other updated instantly.

My big problem now is that I’ve updated to “Big Sir” and now my Packaged environment no-longer renders Widgets at all! This is mission critical something I need to fix!