def __init__(self, parent=None):
        QDialog.__init__(self, parent)

        self.path = os.path.dirname(__file__)

        # Set up the user interface
        uic.loadUi(os.path.join(self.path, "settingsdialog.ui"), self)

        # Set the window icon
        self.setWindowIcon(QIcon(os.path.join(self.path, "icon-small.png")))
Пример #2
0
    def _preview(self):
        """ Preview the .ui file.  Return the exit status to be passed back to
        the parent process.
        """

        from PythonQt import QtGui

        app = QtGui.QApplication([self._ui_file])
        widget = loadUi(self._ui_file)
        widget.show()

        return app.exec_()