我最近更新了我的ubuntu系统,Qt5库已更新至5.6.2版 我有一个现有的ui文件,它在我的python文件中用作:
class Window(QtWidgets.QMainWindow):
def __init__(self):
super(Window,self).__init__()
print("into init")
uic.loadUi('main.ui',self)
print("loaded main.ui")
self.pushButton_2.clicked.connect(lambda: self.reset())
self.pushButton.clicked.connect(lambda: self.submit())
self.pushButton_3.clicked.connect(self.close)
但现在uic.loadUi('main.ui',self)
会出现细分错误。
我尝试在设计器中打开ui文件,并打开时出现以下错误
Error while reparenting!
Designer: A class name mismatch occurred when creating a widget using the custom widget factory registered for widgets of class KDialog. It returned a widget of class QDialog.
QMetaProperty::read: Unable to handle unregistered datatype 'SelectionBehavior' for property 'QTabBar::selectionBehaviorOnRemove'
appmenu-qt: registerWindow 206 "&File"
appmenu-qt: registerWindow 206 "&Edit"
appmenu-qt: registerWindow 206 "F&orm"
appmenu-qt: registerWindow 206 "&View"
appmenu-qt: registerWindow 206 "&Settings"
appmenu-qt: registerWindow 206 "&Window"
appmenu-qt: registerWindow 206 "&Help"
注意:ui文件确实打开了,但是我无法从我的python函数加载它并获得Segmentation Fault