g4ixt / QtTinySA

A Python 'TinySA' GUI programme using Qt5 and PyQt5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QSettings::value: Empty key passed

Ho-Ro opened this issue · comments

commented

The message at program start

QSettings::value: Empty key passed
QSettings::value: Empty key passed

is caused by this line:

app = QtWidgets.QApplication([])  # create QApplication for the GUI

Easy fix, according to the Qt documentation it shall be

app = QtWidgets.QApplication(sys.argv)  # create QApplication for the GUI
commented

I don't see that error when I run it, and my understanding is that you only need to use (sys.argv) if you are passing command line arguments. If I change it, I would also have to 'import sys' at the top of the code I think.

I wonder if it's a Python version issue? I am using Python 3.9.16

commented

I use the debian stable version:
Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
I checked the PyQt documentation and it states that you can use the app = QtWidgets.QApplication([]) format, but this gives the mentioned warning that can be silenced when I provide a non-empty string as argument, e.g. app = QtWidgets.QApplication(' ').

commented

No action planned