Weird grey backgrounds and other issues when I recreated my virtual environment
-
Hi, I'm using QT Designer with PyCharm. I had to recreate my virtual environment and now the app I'm making has random grey backgrounds for QFrames and QMovies, QCombobox drop down menu style glitches and some borders on QPushbuttons.
I haven't changed any code or the .ui file, it only started happening after I created the new virtual environment, any help?
How it looks in PyCharm:
How it looks in QT Designer's preview:
-
Hi,
They might be using different style plugins.
One thing you can try is to set the QT_DEBUG_PLUGINS environment variable to 1 and see what is used by each IDE what launching your application. -
Hi,
They might be using different style plugins.
One thing you can try is to set the QT_DEBUG_PLUGINS environment variable to 1 and see what is used by each IDE what launching your application.@SGaist You mean like this? Is it supposed to print something in the console if there's something wrong? It's not printing anything for me.
if __name__ == '__main__': os.environ['QT_DEBUG_PLUGINS'] = '1' app = QApplication([]) window = MyWindow() window.show() sys.exit(app.exec())
-
I would do that outside of the script or at least before anything Qt related is loaded.
-
You're likely on Windows 11 and the new
windows11
style has some issues.