d3e2e50f0e
- 新增 mainwindow2.{h,cpp,ui}:用 Qt Designer 生成的第二套 QMainWindow 表单
(File/Edit/Help 菜单 + actionOpen/actionAbout_Me),供课堂对比「代码搭界面」
与「Designer 拖界面」两条路线。
- 新增子目录 CMakeLists.txt:供单独打开该示例构建(顶层 add_subdirectory 不递归,
与 lineedit_eye_toggle / mandelbrot_renderer 同模式)。
- mainwindow.ui / mainwindow.qrc:经 Designer 重新保存后的表单与资源清单维护
(iconset 去掉 resource= 显式引用、属性顺序由 Designer 重排)。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
67 lines
1.6 KiB
XML
67 lines
1.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<ui version="4.0">
|
|
<class>MainWindow2</class>
|
|
<widget class="QMainWindow" name="MainWindow2">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>640</width>
|
|
<height>480</height>
|
|
</rect>
|
|
</property>
|
|
<property name="windowTitle">
|
|
<string>MainWindow</string>
|
|
</property>
|
|
<widget class="QWidget" name="centralwidget"/>
|
|
<widget class="QMenuBar" name="menubar">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>640</width>
|
|
<height>21</height>
|
|
</rect>
|
|
</property>
|
|
<widget class="QMenu" name="menuFile">
|
|
<property name="title">
|
|
<string>&File</string>
|
|
</property>
|
|
<addaction name="actionOpen"/>
|
|
</widget>
|
|
<widget class="QMenu" name="menuEdit">
|
|
<property name="title">
|
|
<string>Edit</string>
|
|
</property>
|
|
<addaction name="actionOpen"/>
|
|
</widget>
|
|
<widget class="QMenu" name="menuAbout">
|
|
<property name="title">
|
|
<string>Help</string>
|
|
</property>
|
|
<addaction name="actionOpen"/>
|
|
<addaction name="actionAbout_Me"/>
|
|
</widget>
|
|
<addaction name="menuFile"/>
|
|
<addaction name="menuEdit"/>
|
|
<addaction name="menuAbout"/>
|
|
</widget>
|
|
<widget class="QStatusBar" name="statusbar"/>
|
|
<action name="actionOpen">
|
|
<property name="text">
|
|
<string>&Open</string>
|
|
</property>
|
|
<property name="shortcut">
|
|
<string>Alt+O</string>
|
|
</property>
|
|
</action>
|
|
<action name="actionAbout_Me">
|
|
<property name="text">
|
|
<string>About Me</string>
|
|
</property>
|
|
</action>
|
|
</widget>
|
|
<resources/>
|
|
<connections/>
|
|
</ui>
|