本页内容

设计基于小部件的用户界面

要使用Qt Widgets Designer设计基于小部件的用户界面:

  1. 访问Explorer ,并选择一个.ui文件。
  2. 选择 Open this file with Qt Widgets Designer.

    {在资源管理器中打开 .ui 文件}

  3. 使用Qt Widgets Designer设计用户界面。

设置Qt Widgets Designer 的路径

如果 VS Code 找不到Qt Widgets Designer:

  1. 转到“Command Palette ”,然后选择“Qt: Open Qt Extension settings ”。
  2. 在Custom Widgets Designer Exe Path 中,设置Qt Widgets Designer 的安装文件夹路径。

    {Qt UI 设置}

在文本编辑器中打开 UI 文件

要在文本编辑器中打开 UI 文件:

  1. 转到Explorer ,并选择一个.ui文件。
  2. 选择“Open this file with Text Editor ”。
  3. 使用文本编辑器修改 UI 文件。

另请参阅 教程:《Qt Widgets 应用程序与 Qt 设置》。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.