missing argv variable in sys module
Dynamic Python binding for Qt Applications
Brought to you by:
florianlink,
marcusbarann
Hey,
is it normal that i have no argv variable in the sys module (argv is removed inqcoreapp because python has it's own argeument handling in the sys module)?
If not, does anybody know how that could happen?
example:
Thanks in advance
Tonka
Since Python is embedded, you have to take care of this yourself if you want to have sys.argv:
/* Define sys.argv. It is up to the application if you
want this; you can also leave it undefined (since the Python
code is generally not a main program it has no business
touching sys.argv...)
Ok. Good to know. Do you know a good way to convert qapp.arguments() to wchar** ?
http://doc.qt.io/qt-5/qstring.html#toWCharArray
Hm, i always get
PyThreadState_Get: no current thread
after PySys_SetArgvExMy fault, link to the wrong python-lib. Works perfect
Hi, can you upload your code which are used to convert qapp.arguments() to wchar please ? I entered http://doc.qt.io/qt-5/qstring.html#toWCharArray but I can‘t understand what should I do.So sad......
Last edit: Jian Wang 2019-03-04