- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
您好,我在使用 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。
修复奇怪的 qmake 错误的另一个有用方法是在 Qt Creator 中获取新的项目设置。
关闭 Qt Creator,删除 .pro.user 文件,然后用您的项目重新打开 Qt Creator。这将迫使您使用 Qt 版本调试/发布等重新配置您的项目。
希望对您有所帮助。
关于c++ - QT Creator 出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43768895/
我正在尝试将 Parcelable 数据从一个 Intent 传递到另一个 Intent ,这是我得到的错误: 08-31 14:12:22.709: E/AndroidRuntime(9931):
我收到错误消息“Parcelable 协议(protocol)需要一个在类上名为 CREATOR 的 Parcelable.Creator 对象......”,但我确实有一个 Creator,但我不知
我喜欢 Qt Creator 中的深色“FakeVim”配色方案。然而,它只会使编辑器部分变暗,而其他一切都保持正常,这有点令人不安。有没有办法让 Qt Creator 全局使用这种黑暗方案? Vim
Qt Creator 中是否可以有构建后事件(如在 VC++ 中)?特别是,我想在构建可执行文件后将其复制到另一个文件夹。可以吗? 最佳答案 添加执行脚本以复制文件作为构建步骤,如下所示, 关于qt-
有没有办法在 Qt Creator 中获取打开文档的列表。 有时当 Qt Creator 崩溃并且在重新打开时无法恢复 session 时,在它崩溃之前有一个打开的文件列表会很方便。 最佳答案 不确定
Qt 似乎不像其他 IDE 通常那样在文件夹中构建文件,例如 netbeans 将头文件放在头文件夹中,将源文件放在源文件夹中等等。我已经看到这是在 Qt 中完成的,但我不知道为什么它不在我的电脑上。
我正在尝试创建一个 2 的上标,以显示用户在我的对话框中提供的字段之后的单位标签的平方。我在 Windows 上使用 Qt Creator v2.0.1。 QLabel 有一个文本字段和一个 text
我正在尝试更改 QT Creator 中的构建输出目录(即,我想输出到 ../../bin/debug 而不是输出到 ./debug)。我尝试通过项目模式编辑构建输出目录,但它是只读的。查看 .pro
如何在 QT Creator 中仅编译项目中的一个文件。 有快捷键吗? 例如,在 VS 中,您可以按 Ctrl F7 并编译当前的 cpp 文件。 最佳答案 现在可以做到这一点,至少是 Qt Crea
使用 Qt Creator 的 Memcheck 功能返回以下内容: valgrind: Bad option: --xml=yes, but no XML destination specified
我通常使用带有 cmake 的 Qt creator 来编程 C++ 项目。最近我读了很多关于介子的书,它很简单,我喜欢测试它。 This示例解释了如何设置介子。 在使用介子时,我仍然喜欢使用 Qt
我刚刚在我的机器上构建并安装了 QtQuick3D。我运行示例项目“立方体”。 它有效,我可以构建和执行它。它向我展示了一个可以用鼠标旋转的立方体。但是在 QML 编辑器中,我在所有 Viewport
作为一名已转向 Linux 的老 Borland C++ Bulder 程序员,我很高兴找到 QT 和 QT Creator。 但是我遇到了第一个障碍:我设计了一个带有一些控件的表单,并添加了一个菜单
Visual Assist X 为 Visual Studio 提供了一个很好的功能,称为 column indicator 。它在文本编辑器中的指定列上显示一条垂直线(我使用第 80 列)。这可以帮
这看起来应该很简单,但似乎没有一种方法可以像人们期望的那样做到这一点。 我在 qt Creator 中打开了两个单独的 C++ 项目,我想针对另一个项目中的一个项目进行包含/编译。 这是我的布局: p
问题: Qt Creator 是用 Qt Creator 构建的吗? 同样,Qt Designer 是用 Qt Designer 构建的吗? 顺便说一句,为什么有两个 Qt IDE?他们是竞争对手吗?
我坐在带有 Qt Creator v2.7 的 Ubuntu 12.04(也尝试过新版本,2.8 测试版)中,当我创建一个非 Qt 项目/普通 C++ 项目(CMake Build)时,一切似乎都很好
这个问题在这里已经有了答案: 10年前关闭。 Possible Duplicate: How to get Qt Creator to work with CDB? 我正在尝试将 Cdb 与 Qt C
Qt Creator 通常将注释着色为绿色,但我在 Qt 示例中看到了蓝色注释,而且 Qt Creator 似乎将所有以 //! 开头的注释着色为蓝色。 这是一个示例屏幕截图: 这是某种约定吗?蓝色代
我刚刚从英语下载站点http://qt.nokia.com/downloads上,在我的英语Windows 7系统上下载并安装了Qt Creator 1.3.1,显然,尽管帮助文件是英语,但Qt Cr
我是一名优秀的程序员,十分优秀!