无法选择Qt工具包

问题描述

我最近安装了Qt,并且正在尝试创建一个项目,但是我需要选择一个工具包才能继续进行该项目,但是,显示的两个工具包都是灰色的,我不知道该怎么做选择它们。

它是保存在文档中的QtWidgets项目

构建系统为qmake

类名是MainWindow

基类是QMainWindow

文件是mainwindow.h

文件为mainwindow.cpp

表单文件为mainwindow.ui

屏幕如下:

What the screen looks like

enter image description here

我需要安装任何东西吗?还是有特殊配置?谢谢

解决方法

我的解决方法是打开一个空白文件,将其另存为 filename.ui,然后填写:

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>ClassName</class>
 <widget class="QWidget" name="ClassName">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>553</width>
    <height>520</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>Form</string>
  </property>
  <layout class="QVBoxLayout" name="verticalLayout"/>
 </widget>
 <resources/>
 <connections/>
</ui>

然后我右键单击该文件并选择“在 QT Creator 中打开”