我创造的设计,我的应用程序,与 建设计师 然后变换的每一个窗口向python文件使用的命令pyuic5的例子。ui-o example.py 在能够获得Ui_Form类,并呼吁它在我的节目。 所以每一件事情是工作,但现在我们已经改变了我们设计我们得到一个最大似然的文件。 我的问题是如何使用这个最大似然文件没有改变概念的应用程序。 是否有一个方法就像pyuic5(获得Ui_Form班)转变的最大似然并用它在pyqt5.
这是一个例子的旧应用程序:
from main_screen import Ui_Form as Ui_main_screen
class MainScreen(QWidget, Ui_main_screen):
teachButton = False
manageButton = False
utilitiesButton = False
adminButton = False
helpButton = False
systemButton = False
inspectionButton = False
modelSelected = None
def __init__(self):
super(MainScreen, self).__init__()
#QWidget.__init__(self)
self.setupUi(self)
self.trans = QTranslator(self)
self.toLanguage()
self.product()
self.Menu() .....
正如你可以看到,我进口的Ui_Form到屏类。 现在我想做同样的最大似然的文件
import QtQuick 2.7
Item {
width:904
height:678
Image {
id: background
source: "images/background.png"
x: 0
y: 1
opacity: 1
}
Image {
id: logo
source: "images/logo.png"
x: 691
y: 34
opacity: 1
}
Image {
id: teach
source: "images/teach.png"
x: 717
y: 154
opacity: 1
}
Image {
id: administration
source: "images/administration.png"
x: 711
y: 410
opacity: 0.49803921568627
}
Image {
id: system
source: "images/system.png"
x: 708
y: 468
opacity: 0.49803921568627
}
Image {
id: utilities
source: "images/utilities.png"
x: 711
y: 353
opacity: 0.49803921568627
}
Image {
id: help
source: "images/help.png"
x: 712
y: 524
opacity: 0.49803921568627
}
Image {
id: teachinf_wizard
source: "images/teachinf_wizard.png"
x: 740
y: 196
opacity: 1
}
Image {
id: inspection
source: "images/inspection.png"
x: 713
y: 295
opacity: 0.49803921568627
}
Image {
id: manage
source: "images/manage.png"
x: 714
y: 239
opacity: 1
}
}
因此,如何得到的东西喜欢Ui_Form类的最大似然的文件