【发布时间】:2019-01-03 15:28:18
【问题描述】:
使用 Qt Designer 5.11.1 构建了一个 ui,我添加了一个 QKeySequenceEdit。现在尝试将 ui 转换为 .py,并收到以下错误。
PS C:\dev\app> pyuic5 app.ui > appui.py
Unknown Qt widget: QKeySequenceEdit
这只是一个带有键序列编辑的简单用户界面。
app.ui
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QKeySequenceEdit" name="keySequenceEdit">
<property name="geometry">
<rect>
<x>150</x>
<y>380</y>
<width>113</width>
<height>20</height>
</rect>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>21</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>
【问题讨论】:
-
请分享你的.ui
-
已添加测试 .ui 文件。
-
@AQuick 这是一个错误。请在pyqt mailing list 上报告,以便正确修复。
标签: python pyqt pyqt5 qt-designer