Qml2 camera crash on wni7 64bits(simple codes)



  • Qt version 5.1RC(mingw version)

    main.qml
    @
    import QtQuick 2.0
    import QtMultimedia 5.0

    Rectangle {
    width: 360
    height: 360

    Camera{
        id: camera
    }
    
    VideoOutput {
        id: videoOutput
    
        anchors.fill: parent
        source: camera
    }
    

    }
    @

    main.cpp
    @
    #include <QtGui/QGuiApplication>
    #include "qtquick2applicationviewer.h"

    int main(int argc, char *argv[])
    {
    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile&#40;QStringLiteral("qml/qmlCameraTest/main.qml"&#41;);
    viewer.showExpanded();
    
    return app.exec();
    

    }
    @

    I create a quick2 project by QtCreator, this is the .pro file

    @
    folder_01.source = qml/qmlCameraTest
    folder_01.target = qml
    DEPLOYMENTFOLDERS = folder_01

    QT += quick qml multimedia

    SOURCES += main.cpp

    include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
    qtcAddDeployment()

    @

    error message

    QWidget: Cannot create a QWidget without QApplication
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.

    The QCamera works fine, but the Camera(quick2) crash
    Anyone has the same problem?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.