Important: Please read the Qt Code of Conduct -

No rule to make target 'VLCQtWidgets/WidgetVideo.h', needed by 'ui_mediaplayer.h'

  • Hy guys, I am developing a media player using vlc-qt. So what I have done till now is I have clone the git repository of vlc-qt and have build that using and in my '''pro''' file of Qt I have added the path of my vlc-qt installation like below

    INCLUDEPATH+= /home/vinay/vlc-qt/build/include
    LIBS+= -L/home/vinay/vlc-qt/lib -lVLCQtCore -lVLCQtWidgets

    and I am trying to make same editor as shown by this example

    But here What It has done is that he creates one widget in UI file and then promote it to header WidgetVideo.h and class VlcWidgetVideo So I have done the same. The path for header and class I provided in my promoted widget was

    class name:VlcWidgetVideo
    header: VLCQtWidgets/WidgetVideo.h

    But when I build my project it shows me below error

    No rule to make target 'VLCQtWidgets/WidgetVideo.h', needed by 'ui_mediaplayer.h'.  Stop.

    When I include the header in the project like

    #include "VLCQtWidgets/WidgetVideo.h

    The file is included without showing error it meanas my project is able to access this file but when I run this it shows no rule error.

  • Lifetime Qt Champion

    @devillIsHeree Please show your pro file

  • My pro file

    QT       += core gui multimedia multimediawidgets xml network
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    CONFIG += c++11
    # The following define makes your compiler emit warnings if you use
    # any Qt feature that has been marked 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.
    # You can also make your code fail to compile if it uses 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
    CONFIG += vlc
        LIBS += -lVLCQtCore -lVLCQtWidgets
        LIBS += -lvlc
    SOURCES += \
        main.cpp \
        expplayer.cpp \
    HEADERS += \
        expplayer.h \
    FORMS += \
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    RESOURCES += \

Log in to reply