2017-05-03 19 views
0

こんにちは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:

Error while building/deploying project mygame (kit: Desktop Qt 5.8.0 MSVC2015_64bit) 
When executing step "qmake" 

私は午前:

#------------------------------------------------- 
# 
# 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 += 

出力コンパイルしていませんこれらのエラーを作り出していることを確かめてください(言葉の言葉と言葉をより詳細に言えば「あなたの投稿はもっと詳細を必要としていますように見えます」というメッセージは消え去ります。それはすぐにいつでも行かないように見える。そこに行く)。

+0

これは非常に役に立つ質問タイトルではありません。 – MrEricSir

答えて

0

コンパイル出力タブを見てください。必要に応じて、コマンドプロンプトでqmakeを実行することもできます。

奇妙なqmakeエラーを修正するもう1つの便利な方法は、Qt Creatorで新しいプロジェクト設定を取得することです。

Qt Creatorを閉じ、.pro.userファイルを削除して、プロジェクトでQt Creatorを再度開きます。これにより、Qtバージョンのデバッグ/リリースなどでプロジェクトを再構成する必要があります。

希望するものがあります。

関連する問題