Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Exchange char buffer between Qt c++ and QML

$
0
0
main.cc main () { QGuiApplication app(argc, argv);       QtQuick2ApplicationViewer viewer;     myObj obj; //! -->     qmlRegisterType<ByteArrayWrapper, 1>("ByteArrayWrapper", 1, 0, "CppType"); //! <--     viewer.rootContext()->setContextProperty("audioData", &obj);     viewer.setMainQmlFile(QStringLiteral("./qml/TestProject/main.qml"));     QObject *object = viewer.rootObject();       QObject::connect(&obj, SIGNAL(triggerDraw()), object, SLOT(on_drawBuffer()));     viewer.showExpanded();         return app.exec(); } And getAudioBuffer() returns ByteArrayBuffer*. This is important. Thank you Vincent

Viewing all articles
Browse latest Browse all 4972

Latest Images

Trending Articles



Latest Images