7 Module implementing a dialog to enter some non-common uic compiler options. |
7 Module implementing a dialog to enter some non-common uic compiler options. |
8 """ |
8 """ |
9 |
9 |
10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 |
11 |
12 from PyQt5.QtCore import PYQT_VERSION |
|
13 from PyQt5.QtWidgets import QDialog |
12 from PyQt5.QtWidgets import QDialog |
14 |
13 |
15 from .Ui_UicCompilerOptionsDialog import Ui_UicCompilerOptionsDialog |
14 from .Ui_UicCompilerOptionsDialog import Ui_UicCompilerOptionsDialog |
16 |
15 |
17 |
16 |
35 |
34 |
36 self.packageEdit.setText(compilerOptions["Package"]) |
35 self.packageEdit.setText(compilerOptions["Package"]) |
37 self.packageRootEdit.setText(compilerOptions["PackagesRoot"]) |
36 self.packageRootEdit.setText(compilerOptions["PackagesRoot"]) |
38 self.suffixEdit.setText(compilerOptions["RcSuffix"]) |
37 self.suffixEdit.setText(compilerOptions["RcSuffix"]) |
39 |
38 |
40 if 'uic5' not in compiler or PYQT_VERSION < 0x050600: |
39 if 'uic5' not in compiler: |
41 # only supported for PyQt5 >= 5.6 (April 2016) |
|
42 self.packageGroup.setEnabled(False) |
40 self.packageGroup.setEnabled(False) |
43 |
41 |
44 msh = self.minimumSizeHint() |
42 msh = self.minimumSizeHint() |
45 self.resize(max(self.width(), msh.width()), msh.height()) |
43 self.resize(max(self.width(), msh.width()), msh.height()) |
46 |
44 |