[PySide] Detecting which framework (PyQt or PySide) is active
David García Garzón
david.garcia at upf.edu
Mon Sep 3 17:47:47 CEST 2012
Hi, i am working on a CPython function i want to transparently run with either
PyQt or PySide. It is a functions that builds an interface using C++ and then
wraps it using either Sip (PyQt) or shiboken (PySide) in order to return it to
python. The wrapping part was solved thanks to your help in a different thread
but i still have the problem of knowing which wrapper i should use in a given
situation.
Is there some state (function, singletons, globals...) i could check? I am
thinking on the pyside created QApp or any PySide state it requires to be
initializated.
Additional info: The library is split in two layers, a python and a C one, so
it could be either api, but not in user code, so solution such as checking the
imported modules are not convinient. If there is no api for that i am thinking
in hacks like using PySide initializations required by QApp if any.
Any ideas?
David.
More information about the PySide
mailing list