e880c851c6
QListWidget(列表控件) and QToolButton(工具按钮) 的介绍和使用
585 lines
16 KiB
XML
585 lines
16 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<ui version="4.0">
|
|
<class>ExQListWidget</class>
|
|
<widget class="QMainWindow" name="ExQListWidget">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>730</width>
|
|
<height>436</height>
|
|
</rect>
|
|
</property>
|
|
<property name="windowTitle">
|
|
<string>ExQListWidget</string>
|
|
</property>
|
|
<widget class="QWidget" name="centralWidget">
|
|
<widget class="QSplitter" name="splitter">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>731</width>
|
|
<height>341</height>
|
|
</rect>
|
|
</property>
|
|
<property name="orientation">
|
|
<enum>Qt::Horizontal</enum>
|
|
</property>
|
|
<widget class="QToolBox" name="toolBox">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>140</width>
|
|
<height>0</height>
|
|
</size>
|
|
</property>
|
|
<property name="maximumSize">
|
|
<size>
|
|
<width>180</width>
|
|
<height>16777215</height>
|
|
</size>
|
|
</property>
|
|
<property name="currentIndex">
|
|
<number>0</number>
|
|
</property>
|
|
<widget class="QWidget" name="pageList">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>180</width>
|
|
<height>251</height>
|
|
</rect>
|
|
</property>
|
|
<attribute name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/List.png</normaloff>:/images/List.png</iconset>
|
|
</attribute>
|
|
<attribute name="label">
|
|
<string>QListWidget展示</string>
|
|
</attribute>
|
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
<item>
|
|
<widget class="QToolButton" name="toolBtnInit">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>120</width>
|
|
<height>25</height>
|
|
</size>
|
|
</property>
|
|
<property name="text">
|
|
<string>toolBtnInit</string>
|
|
</property>
|
|
<property name="toolButtonStyle">
|
|
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QToolButton" name="toolBtnClear">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>120</width>
|
|
<height>25</height>
|
|
</size>
|
|
</property>
|
|
<property name="text">
|
|
<string>toolBtnClear</string>
|
|
</property>
|
|
<property name="toolButtonStyle">
|
|
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QToolButton" name="toolBtnInsert">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>120</width>
|
|
<height>25</height>
|
|
</size>
|
|
</property>
|
|
<property name="text">
|
|
<string>toolBtnInsert</string>
|
|
</property>
|
|
<property name="toolButtonStyle">
|
|
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QToolButton" name="toolBtnAdd">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>120</width>
|
|
<height>25</height>
|
|
</size>
|
|
</property>
|
|
<property name="text">
|
|
<string>toolBtnAdd</string>
|
|
</property>
|
|
<property name="toolButtonStyle">
|
|
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QToolButton" name="toolBtnDelete">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>120</width>
|
|
<height>25</height>
|
|
</size>
|
|
</property>
|
|
<property name="text">
|
|
<string>toolBtnDelete</string>
|
|
</property>
|
|
<property name="toolButtonStyle">
|
|
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
<widget class="QWidget" name="pageTree">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>180</width>
|
|
<height>251</height>
|
|
</rect>
|
|
</property>
|
|
<property name="cursor">
|
|
<cursorShape>SizeVerCursor</cursorShape>
|
|
</property>
|
|
<attribute name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/TREE.png</normaloff>:/images/TREE.png</iconset>
|
|
</attribute>
|
|
<attribute name="label">
|
|
<string>QTreeWidget展示</string>
|
|
</attribute>
|
|
<layout class="QGridLayout" name="gridLayout_2">
|
|
<item row="0" column="0">
|
|
<widget class="QGroupBox" name="groupBox">
|
|
<property name="title">
|
|
<string>GroupBox</string>
|
|
</property>
|
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
<item>
|
|
<widget class="QLabel" name="labLeft">
|
|
<property name="text">
|
|
<string>此处没有实现任何功能</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QLineEdit" name="lineEditLeft"/>
|
|
</item>
|
|
<item>
|
|
<widget class="QSpinBox" name="spinBoxLeft"/>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</item>
|
|
<item row="1" column="0">
|
|
<spacer name="verticalSpacer">
|
|
<property name="orientation">
|
|
<enum>Qt::Vertical</enum>
|
|
</property>
|
|
<property name="sizeHint" stdset="0">
|
|
<size>
|
|
<width>20</width>
|
|
<height>40</height>
|
|
</size>
|
|
</property>
|
|
</spacer>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
<widget class="QWidget" name="pageTable">
|
|
<attribute name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/Table.png</normaloff>:/images/Table.png</iconset>
|
|
</attribute>
|
|
<attribute name="label">
|
|
<string>QTableWidget展示</string>
|
|
</attribute>
|
|
<widget class="QLabel" name="label_2">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>10</x>
|
|
<y>60</y>
|
|
<width>161</width>
|
|
<height>91</height>
|
|
</rect>
|
|
</property>
|
|
<property name="text">
|
|
<string>此处连布局都没有</string>
|
|
</property>
|
|
</widget>
|
|
</widget>
|
|
</widget>
|
|
<widget class="QTabWidget" name="tabWidget">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>320</width>
|
|
<height>0</height>
|
|
</size>
|
|
</property>
|
|
<property name="currentIndex">
|
|
<number>0</number>
|
|
</property>
|
|
<widget class="QWidget" name="tabList">
|
|
<attribute name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/List.png</normaloff>:/images/List.png</iconset>
|
|
</attribute>
|
|
<attribute name="title">
|
|
<string>QListWidget</string>
|
|
</attribute>
|
|
<layout class="QGridLayout" name="gridLayout_3">
|
|
<item row="2" column="0">
|
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
<item>
|
|
<widget class="QToolButton" name="toolBtnSelectItem">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>0</width>
|
|
<height>25</height>
|
|
</size>
|
|
</property>
|
|
<property name="text">
|
|
<string>tBtnSelectItem</string>
|
|
</property>
|
|
<property name="popupMode">
|
|
<enum>QToolButton::MenuButtonPopup</enum>
|
|
</property>
|
|
<property name="toolButtonStyle">
|
|
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QToolButton" name="toolBtnSelAll">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>0</width>
|
|
<height>25</height>
|
|
</size>
|
|
</property>
|
|
<property name="text">
|
|
<string>tBtnSelAll</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QToolButton" name="toolBtnSelNone">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>0</width>
|
|
<height>25</height>
|
|
</size>
|
|
</property>
|
|
<property name="text">
|
|
<string>tBtnSelNone</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QToolButton" name="toolBtnSelInvs">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>0</width>
|
|
<height>25</height>
|
|
</size>
|
|
</property>
|
|
<property name="text">
|
|
<string>tBtnSelInvs</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
<item row="1" column="0">
|
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
<item>
|
|
<widget class="QLabel" name="labCurrItem">
|
|
<property name="text">
|
|
<string>当前项的变化:</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QLineEdit" name="lineEditRight"/>
|
|
</item>
|
|
<item>
|
|
<widget class="QCheckBox" name="checkBox">
|
|
<property name="text">
|
|
<string>可编辑</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
<item row="3" column="0">
|
|
<widget class="QListWidget" name="listWidget">
|
|
<item>
|
|
<property name="text">
|
|
<string>this is first item</string>
|
|
</property>
|
|
<property name="checkState">
|
|
<enum>Unchecked</enum>
|
|
</property>
|
|
<property name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/github.png</normaloff>:/images/github.png</iconset>
|
|
</property>
|
|
<property name="flags">
|
|
<set>ItemIsSelectable|ItemIsEditable|ItemIsDragEnabled|ItemIsUserCheckable|ItemIsEnabled</set>
|
|
</property>
|
|
</item>
|
|
<item>
|
|
<property name="text">
|
|
<string>这是第二个项item</string>
|
|
</property>
|
|
<property name="checkState">
|
|
<enum>Unchecked</enum>
|
|
</property>
|
|
<property name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/gril.png</normaloff>:/images/gril.png</iconset>
|
|
</property>
|
|
</item>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
<widget class="QWidget" name="tabTree">
|
|
<attribute name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/TREE.png</normaloff>:/images/TREE.png</iconset>
|
|
</attribute>
|
|
<attribute name="title">
|
|
<string>QTreeWidget</string>
|
|
</attribute>
|
|
<layout class="QGridLayout" name="gridLayout">
|
|
<item row="0" column="0">
|
|
<widget class="QPushButton" name="pushButton">
|
|
<property name="text">
|
|
<string>这里什么都没有,只有一个布局,此页面也没有实现任何功能</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
<widget class="QWidget" name="tabTable">
|
|
<attribute name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/Table.png</normaloff>:/images/Table.png</iconset>
|
|
</attribute>
|
|
<attribute name="title">
|
|
<string>QTableWidget</string>
|
|
</attribute>
|
|
<widget class="QLabel" name="label">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>110</x>
|
|
<y>120</y>
|
|
<width>331</width>
|
|
<height>101</height>
|
|
</rect>
|
|
</property>
|
|
<property name="text">
|
|
<string>这里什么都没有,连布局都没有</string>
|
|
</property>
|
|
</widget>
|
|
</widget>
|
|
</widget>
|
|
</widget>
|
|
</widget>
|
|
<widget class="QMenuBar" name="menuBar">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>730</width>
|
|
<height>23</height>
|
|
</rect>
|
|
</property>
|
|
</widget>
|
|
<widget class="QStatusBar" name="statusBar"/>
|
|
<widget class="QToolBar" name="toolBar">
|
|
<property name="windowTitle">
|
|
<string>toolBar</string>
|
|
</property>
|
|
<property name="toolButtonStyle">
|
|
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
|
</property>
|
|
<attribute name="toolBarArea">
|
|
<enum>TopToolBarArea</enum>
|
|
</attribute>
|
|
<attribute name="toolBarBreak">
|
|
<bool>false</bool>
|
|
</attribute>
|
|
<addaction name="actListInit"/>
|
|
<addaction name="actClear"/>
|
|
<addaction name="actInsert"/>
|
|
<addaction name="actAdd"/>
|
|
<addaction name="actDel"/>
|
|
</widget>
|
|
<action name="actListInit">
|
|
<property name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/init.png</normaloff>:/images/init.png</iconset>
|
|
</property>
|
|
<property name="text">
|
|
<string>初始化</string>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string>初始化列表</string>
|
|
</property>
|
|
<property name="shortcut">
|
|
<string>Ctrl+I</string>
|
|
</property>
|
|
</action>
|
|
<action name="actClear">
|
|
<property name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/clear.png</normaloff>:/images/clear.png</iconset>
|
|
</property>
|
|
<property name="text">
|
|
<string>清除</string>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string>清除列表</string>
|
|
</property>
|
|
<property name="shortcut">
|
|
<string>Alt+C</string>
|
|
</property>
|
|
</action>
|
|
<action name="actInsert">
|
|
<property name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/insert.png</normaloff>:/images/insert.png</iconset>
|
|
</property>
|
|
<property name="text">
|
|
<string>插入</string>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string>插入项</string>
|
|
</property>
|
|
<property name="shortcut">
|
|
<string>Alt+I</string>
|
|
</property>
|
|
</action>
|
|
<action name="actAdd">
|
|
<property name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/add.png</normaloff>:/images/add.png</iconset>
|
|
</property>
|
|
<property name="text">
|
|
<string>添加</string>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string>添加项</string>
|
|
</property>
|
|
<property name="shortcut">
|
|
<string>Alt+A</string>
|
|
</property>
|
|
</action>
|
|
<action name="actDel">
|
|
<property name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/delete.png</normaloff>:/images/delete.png</iconset>
|
|
</property>
|
|
<property name="text">
|
|
<string>删除</string>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string>删除当前项目</string>
|
|
</property>
|
|
<property name="shortcut">
|
|
<string>Ctrl+D</string>
|
|
</property>
|
|
</action>
|
|
<action name="actSelAll">
|
|
<property name="text">
|
|
<string>全选</string>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string>选择全部</string>
|
|
</property>
|
|
<property name="shortcut">
|
|
<string>Ctrl+A</string>
|
|
</property>
|
|
</action>
|
|
<action name="actSelNone">
|
|
<property name="text">
|
|
<string>全不选</string>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string>全部不选中</string>
|
|
</property>
|
|
</action>
|
|
<action name="actSelInvs">
|
|
<property name="text">
|
|
<string>反选</string>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string>选择相反的部分</string>
|
|
</property>
|
|
</action>
|
|
<action name="actSelPopMenu">
|
|
<property name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/menu.png</normaloff>:/images/menu.png</iconset>
|
|
</property>
|
|
<property name="text">
|
|
<string>选项</string>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string>多种选择方式</string>
|
|
</property>
|
|
</action>
|
|
<action name="actExit">
|
|
<property name="icon">
|
|
<iconset resource="resources.qrc">
|
|
<normaloff>:/images/exit.png</normaloff>:/images/exit.png</iconset>
|
|
</property>
|
|
<property name="text">
|
|
<string>退出</string>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string>退出程序</string>
|
|
</property>
|
|
<property name="shortcut">
|
|
<string>Ctrl+0</string>
|
|
</property>
|
|
</action>
|
|
</widget>
|
|
<layoutdefault spacing="6" margin="11"/>
|
|
<resources>
|
|
<include location="resources.qrc"/>
|
|
</resources>
|
|
<connections>
|
|
<connection>
|
|
<sender>actSelPopMenu</sender>
|
|
<signal>triggered()</signal>
|
|
<receiver>actSelInvs</receiver>
|
|
<slot>trigger()</slot>
|
|
<hints>
|
|
<hint type="sourcelabel">
|
|
<x>-1</x>
|
|
<y>-1</y>
|
|
</hint>
|
|
<hint type="destinationlabel">
|
|
<x>363</x>
|
|
<y>212</y>
|
|
</hint>
|
|
</hints>
|
|
</connection>
|
|
</connections>
|
|
</ui>
|