TypeRig
TypeRig copied to clipboard
GUI OS check failing on older MacOs
Currently we are using os.platform
to check foe specific OSes in the custom QtGui. But it seems that under older MacOs (like High Sierra) the Py3 complains about missing MSVCRT, which is absurd!
@twardoch suggests using QtCore.QSysInfo() , but from what i've red it seems that on PyQt it is impossible to check for Q_OS_WIN and Q_OS_MACOS as given in the Qt Docs.
In StackOverflow i've found the following solution that seems to be working?
To test if the underlying operating system is a macintosh
import PyQt4.QtGui
MAC = hasattr(PyQt4.QtGui, "qt_mac_set_native_menubar")
To test if the underlying operating system is Linux/X11, BSD, Solaris
import PyQt4.QtGui
X11 = hasattr(PyQt4.QtGui, "qt_x11_wait_for_window_manager")
From Mark Summerfield's book I don't know of a specific Windows test but if the two above returned None then it's likely the system is windows.