Qt World Summit: Register Today!

XML file whose path is specified in qrc file is not loaded

  • CascadeClassifier faceClassifier;
    CascadeClassifier eyeClassifier;

    This is a simple OpenCV code and load() function is blocked by Q_ASSERT. (which means it can not find the xml file)

    <!DOCTYPE RCC><RCC version="1.0">

    This is the qrc file


  • Lifetime Qt Champion

    What XML parser are you using ?
    The Qt one ?

    Also please show code for

    for test, please delete whole build folder so tmp files are 100% surely deleted.
    then rebuild all.

  • @mrjj CascadeClassifier::load is not a function I made, but a function in OpenCV module.
    I tried deleting the build folder, but it doesn't work either

  • Lifetime Qt Champion

    @Aaron-Kim Does OpenCV know anything about Qt resource files? If not this can't work. You will need to copy the XML file from the resource to some temporary location.

  • @jsulm Yes I guess that OpenCV does not support it. thanks!

Log in to reply