def get_qtdesigner_bin(): designer_bin = str(QtCore.QLibraryInfo.location( QtCore.QLibraryInfo.BinariesPath)) plat = sys.platform if plat == "darwin": designer_bin = os.path.join(designer_bin, "Designer.app", "Contents", "MacOS") elif plat in ("win32", "nt"): qt = getQt() designer_bin = os.path.abspath(os.path.dirname(qt.__file__)) designer_bin = os.path.join(designer_bin, "designer") return designer_bin
# ---------------------------------------------------------------------------- # This file is part of qarbon (http://qarbon.rtfd.org/) # # Copyright (c) 2013 European Synchrotron Radiation Facility, Grenoble, France # # Distributed under the terms of the GNU Lesser General Public License, # either version 3 of the License, or (at your option) any later version. # See LICENSE.txt for more info. # ---------------------------------------------------------------------------- """This module exposes QtCore module""" from qarbon.external.qt import getQt __backend = getQt().__name__ def __to_qvariant_1(pyobj=None): """Properly converts a python object into a proper QVariant according to the PySide or PyQt API version in use :param pyobj: object to be converted :return: A proper QVariant""" from PyQt4.QtCore import QVariant if pyobj is None: return QVariant() # PyQt 4.4 doesn't accept QVariant(None) return QVariant(pyobj) def __from_qvariant_1(qobj=None, convfunc=None): """Properly converts a QVariant/QVariant equivalent to a python object according to the PySide or PyQt API version in use