QT创建者的错误
Error with QT Creator
你好,我正在与QT Creator一起构建错误,我想知道有人知道为什么会犯这些错误。谢谢
main.cpp:
#include <QApplication>
#include <QGraphicsScene>
#include <QGraphicsRectItem>
#include <QGraphicsView>
int main(int argc, char *argv[]){
QApplication a(argc, argv);
//Create Scene
QGraphicsScene * scene = new QGraphicsScene();
//Creat Item To Put Into Scene
QGraphicsRectItem * rect = new QGraphicsRectItem();
rect->setRect(100, 50, 100, 100);
//Add Item To Scene aka buffer
scene->addItem(rect);
//add a view
QGraphicsView * view = new QGraphicsView(scene);
view->show();
return a.exec();
}
mygame.pro:
#-------------------------------------------------
#
# Project created by QtCreator 2017-05-03T12:14:31
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = mygame
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += main.cpp
HEADERS +=
编译输出:
Error while building/deploying project mygame (kit: Desktop Qt 5.8.0 MSVC2015_64bit)
When executing step "qmake"
我不确定是什么犯了这些错误(单词和更多单词以获取更多细节,因此"看起来您的帖子需要更多细节"会消失...它不会消失,所以我将继续键入直到它选择这样做,但看起来它不会很快到达任何时间。我们走了(。
查看"编译输出"选项卡。如果需要
修复奇异QMAKE错误的另一种有用方法是在QT Creator中获得新的项目设置。
关闭QT创建者,删除.pro.user文件,然后在您的项目中重新打开QT创建者。这将迫使您使用QT版本的调试/发布等重新配置您的项目。
希望会有所帮助。
相关文章:
- 警告处理为错误这里有什么问题
- "error: no matching function for call to"构造函数错误
- boost::进程间消息队列引发错误
- C++,OpenCV,尝试显示图像时"OpenCV(4.3.0) Error: Assertion failed (size.width>0 && size.height>0)"此错误
- QT创建者的错误
- QT创建者:简单程序未解决的外部符号和外部符号错误
- qt创建者cmakelists.txt C 链接错误
- QT创建者的运行应用程序会出现错误QXCBConnection,然后流产
- 错误编译QT创建者 / QT窗口小部件示例
- QT创建者错误地处理标头文件包含来自Directory
- Qt创建者错误代码-1073741819
- OpenCv+mac操作系统x+qt创建者=奇怪的链接错误
- 将opencv库添加到QT创建者并获取错误:链接器命令失败,退出代码为1
- Qt 创建者编译错误"找不到 UIC.exe从 msvc 2012 路径"
- Qt创建者会话管理器错误
- qt创建者opencv windows cmake错误
- Qt创建者-项目错误:Xcode设置不正确.您可能需要通过运行/usr/bin/xcodebuild来确认许可协议
- Qt创建者.为什么我在编译发布版本时会收到一个关于供过于求的错误,而不是调试
- Qt创建者编译错误(找不到.o文件)
- QT创建者错误(与操作员不匹配=)