Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qml2 camera crash on wni7 64bits(simple codes)

Qml2 camera crash on wni7 64bits(simple codes)

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 846 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    stereomatching
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved