[Qt-qml] Audio - Qt.multimedia

Romain Pokrzywka romain at kdab.com
Wed Jun 16 11:24:02 CEST 2010


You can also try with 	QDeclarativeEngine::addImportPath()/addPluginPath(), although QTDIR/imports should be set by 
default. Did you check what paths are returned by QDeclarativeEngine::importPathList() and pluginPathList() ?
It seems like you're running your app locally on the desktop, but I know I've had trouble when deploying on WinCE 
because the standard paths weren't set correctly by qt during configuration, so it's worth checking the output from 
configure.exe too.

Btw, thanks for the tip about QUrl::fromLocalFile(":/bla"), I was wondering how I could get my qml files stored into 
resources, and for some reason I didn't think fromLocalFile would work :)
I'm not sure it works inside the qml files directly though, ie. : Image { source: ":/someimage.png" }

Cheers
Romain

On Wednesday 16 June 2010 09:58:13 Cristian Daniel Stamateanu wrote:
> Ok, got one step further, I added to my cpp code the following:
>
> ...
> QDeclarativeEngine engine;
> engine.importPlugin("C:/Qt/4.7.0-beta1/imports/Qt/multimedia/multimediad.dl
>l","Qt.multimedia"); ...
> ui->declarativeView->setSource(QUrl::fromLocalFile(":/qml/main.qml"));
>
> and now it seems to work, but it seems to me this is just a hack. There
> should be a nicer way without full paths and imports in my code.
>
> Regards,
> Cristi
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml



-- 
Romain Pokrzywka | romain at kdab.com | Certified Qt Software Engineer & Trainer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100616/16ab935d/attachment.bin 


More information about the Qt-qml mailing list