Important: Please read the Qt Code of Conduct -

Qtgstreamer : Libraries error

  • Hi !

    I am very new about Qt and Gstreamer(actually in developping in general), but I have to do a project for my studies. In this project I need to stream a vidéo from an IP camera. I found a code example on the web. The problem is : I get an error for every include in the code relating to QGst for example : "QGst/Pipeline : No such file or directory"

    I use Ubuntu 18.04 LTS and Qt creator based on Qt 5.9.5. To install QtGstreamer plugins I used the command :
    sudo apt-get install qtgstreamer-plugins-qt5 (and basically I have installed Gstreamer before).

    So as I said, I am very new in that field, I tried to read the documentation but I didn't understand where I can found my answers.

    Thanks :D

  • Lifetime Qt Champion

    @Chanchan Is your project QMake based?
    Also qtgstreamer-plugins-qt5 is not what contains Qtgstreamer, you need libqt5gstreamer5-dev

  • Yes it is ! But I have difficulties to add files to the qmake, I do not found files in my Disk, however I downloaded thanks to the prompt.
    For now my qmake is too much simple I think and I need to add libraries :

    "HEADERS +=
    mediaapp.h \

    SOURCES +=

    QT += widgets

  • Lifetime Qt Champion

    @Chanchan You need to install libqt5gstreamer5-dev

  • Mmh the prompt tells that it is impossible to found it, I will try to found a download version on internet and runs my program again. And I dont found a good version of this lib for now

  • Lifetime Qt Champion

    @Chanchan Sorry, it is libqt5gstreamer-dev

  • Yeah ! i found it ahah but as a "nooby" on this forum I can only post every 600 seconds ^^

    So I installed it, I have still the same error with libraries in my code. Should I link something to these libraries I just downloaded or something like this ?

  • Lifetime Qt Champion

    @Chanchan Is it still error when including the header files? Search for that files and see where exactly those are located and whether you're including them correctly (maybe you don't need QGst/ in front of header file).

  • Yes I can, but each time I just move the problem to the include inside the other header file I had.

    For exemple, I added pipeline.h, so yes my code found it, but pipeline.h needs two other header file to works, these also need two or three header files each, etc...

    Can I link the entire library without moving all header files ? From the .pro maybe ? With what I'm reading from the documentation it should be possible but I dont found the command for now

  • Lifetime Qt Champion

    @Chanchan I don't know what you mean by "move".
    Take a look at INCLUDEPATH in

  • I mean, I solve the problem, but create another from the fact that I added a new header which needed other header files, etc...

    Thanks for your link ! In theory that is exactly what I need ! In practical, I added : INCLUDEPATH = /usr/include/Qt5GStreamer/include (Where all my header files are) But I still have the same issu : "No such file or directory".

    Did I miss something, using this line ? (I added it in my .pro )

  • Update at this time, I restart the soft and it does recognize the path to the libraries ! The command "INCLUDEPATH" was the good one :) Thank you verymuch @jsulm :)

    Another issue, still with libraries :

    #include <QDeclarativeView>
    #include <QDeclarativeContext>
    #include <QDeclarativeEngine>
    Still doesn't work, on forums, people said that we need to add "QT += declarative" for the three first but it doesn't work, and same for the last one

  • Lifetime Qt Champion


    @Chanchan said in Qtgstreamer : Libraries error:


    This is a Qt 4, see here for porting to Qt 5.

    Take a look at the QQmlEngine class documentation for example, you have at the top of the page which Qt module contains it.

  • Hi @SGaist , thx for your answer :)

    mmh I tried to add the qmake relatives to changements that concern my code. But for example, I add
    QT += qml to my .pro, and it returns me an error :/ I think that everything is update

  • I update my situation :
    I still have 3 errors ( not so bad considering my 23 at the begining ><) :

    #include <QDeclarativeView>
    #include <QDeclarativeContext>
    #include <QdeclaratveEngine>

    By Curiosity I searched on my computer files named "QDeclarativexxx" but I only found "" located in a qt4 repertory, I dont know this extension and it seems that I dont have libraries refering to Qt declarative.

    Basically (I'm the Doctor B-) ) I tried to download libraries throught the promptcommand, but I dont found the good commandline ><

    I took a look on the @SGaist link, in the case of QDeclarative view, the change is : QQuickView and Qt+= quick in my .pro, unfortunately it doesn't work. I searched for a QQuickView library, I only found an html file... So I dont know if it is considered as a library or not, so for now that's the point

    By the way, thank you for helping me :)

  • Lifetime Qt Champion

    How did you install Qt ?

  • @SGaist Well, it seems that Qt += Quick and a reboot of my computer was enough to works x) So My libraries works and I can run my code :) Thank you for your precious link !

    To answer your last question, to install Qt I used :

    sudo apt install build-essential
    sudo apt install qtcreator
    sudo apt install qt5-default
    sudo apt install qt5-doc
    sudo apt install qt5-doc-html qtbase5-doc-html
    sudo apt install qtbase5-examples

Log in to reply