0

在 Windows 10 64 位中运行 qt 5.8 中的程序时出现此错误。如何解决这个问题。

我的简历

00:43:14: Running steps for project untitled1...
00:43:16: Starting: "G:\IDE\Qt5.8.0\5.8\mingw53_32\bin\qmake.exe" "G:\Qt Projects\untitled1\untitled1.pro" -spec win32-g++ "CONFIG+=qml_debug"
MAKEFILE_GENERATOR variable not set as a result of parsing : untitled1.pro. Possibly qmake was not able to find files included using "include(..)" - enable qmake debugging to investigate more.
00:43:32: The process "G:\IDE\Qt5.8.0\5.8\mingw53_32\bin\qmake.exe" exited with code 3.
Error while building/deploying project untitled1 (kit: Desktop Qt 5.8.0 MinGW 32bit)
When executing step "qmake"
00:43:32: Elapsed time: 00:18.

头文件

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H

main.cpp 文件

#include "mainwindow.h"
#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec();
}

主窗口.cpp 文件

#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}

主窗口.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>480</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>MainWindow</string>
  </property>
  <widget class="QWidget" name="centralWidget"/>
 </widget>
 <layoutdefault spacing="6" margin="11"/>
 <resources/>
 <connections/>
</ui>

请帮我解决这个问题。谢谢

4

0 回答 0