Nominate our 2022 Qt Champions!

QtCore/QtGlobal: No such file or directory

  • I am working with QtGStreamer on one of the examples, and I cannot get it to work. I keep getting the error 'QtCore/QtGlobal: No such file or directory' from global.h, when I try #include <QtCore/QtGlobal in main.cpp I don't get an error from that.
    Here is my code:


    #include "mediaapp.h"
    #include <QApplication>
    #include <QGst/Init>
    int main(int argc, char *argv[])
        QApplication app(argc, argv);
        QGst::init(&argc, &argv);
        MediaApp media;;
        if (argc == 2) {
        return app.exec();

    TEMPLATE = app
    TARGET = player
    CONFIG += silent
    CONFIG += pkgconfig
    contains(QT_VERSION, ^4\\..*) {
        PKGCONFIG += QtGStreamer-1.0 QtGStreamerUi-1.0
    contains(QT_VERSION, ^5\\..*) {
        PKGCONFIG += Qt5GStreamer-1.0 Qt5GStreamerUi-1.0\
    QT += core quick widgets
    CONFIG += qt console bootstrap
    HEADERS += mediaapp.h player.h
    SOURCES += main.cpp mediaapp.cpp player.cpp
    INCLUDEPATH += C:\qt-gstreamer-1.2.0\src \
        C:\Qt\Qt5.4.1\5.4\mingw491_32\include \
        C:\Qt\Qt5.4.1\5.4\android_armv5\include \
        C:\Qt\Qt5.4.1\5.4\android_armv7\include \
        C:\Qt\Qt5.4.1\5.4\android_x86\include \

    In C:\Qt...\include there is a directory QtCore with QtGlobal. While typing it in to global.h I get suggestions to put it in, but it throws an error when I try and build it.