[Qt-qml] Audio - Qt.multimedia

2010-06-14 Thread Cristian Daniel Stamateanu
Hello, I have a C++ project that displays QML files inside a QDeclarativeView. I tried to make Audio work according to the user manual example and I cannot: import Qt 4.7 import Qt.multimedia 4.7 Audio { source: "audio/song.mp3" } I get the following error: file::/qml/main.qml:2:1: module "Qt

Re: [Qt-qml] Audio - Qt.multimedia

2010-06-14 Thread Justin McPherson
Hi, On 14/06/2010, at 11:43 PM, ext Cristian Daniel Stamateanu wrote: > I have a C++ project that displays QML files inside a QDeclarativeView. I > tried to make Audio work according to the user manual example and I cannot: > > import Qt 4.7 > import Qt.multimedia 4.7 > > Audio { source: "aud

Re: [Qt-qml] Audio - Qt.multimedia

2010-06-15 Thread Cristian Daniel Stamateanu
Hello Justin, Here is the output for tvtennis: Starting C:\Qt\qtcreator-1.3.83\bin\qml.exe C:/Qt/4.7.0-beta1/examples/declarative/tvtennis/tvtennis.qml QDeclarativeEngine::addImportPath "C:/Qt/qtcreator-1.3.83/bin" QDeclarativeEngine::addToImport 0x205a3a4 "." -1.-1 File as "" QDeclarativeEngine::

Re: [Qt-qml] Audio - Qt.multimedia

2010-06-15 Thread Martin Jones
This looks suspicious: > "" file::/qml/main.qml:2:1: module "Qt.multimedia" is not installed That isn't a valid URL. Did you supply a valid URL for the QML file? QUrl::fromLocalFile() is the easiest way. Regards, Martin. On Tue, 15 Jun 2010 06:55:09 pm ext Cristian Daniel Stamateanu wrote: >

Re: [Qt-qml] Audio - Qt.multimedia

2010-06-16 Thread Cristian Daniel Stamateanu
Hi Martin, Since my project is not a qml project but a C++ one, I have to deploy the qml with the executable. So to do that I use a resource .qrc file that has reference to my qml files: qml/main.qml qml/RssModel.qml This has the effect that the qml are available

Re: [Qt-qml] Audio - Qt.multimedia

2010-06-16 Thread Cristian Daniel Stamateanu
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.dll","Qt.multimedia"); ... ui->declarativeView->setSource(QUrl::fromLocalFile(":/qml/main.qml")); and now it seems to work, but

Re: [Qt-qml] Audio - Qt.multimedia

2010-06-16 Thread Romain Pokrzywka
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

Re: [Qt-qml] Audio - Qt.multimedia

2010-06-16 Thread Cristian Daniel Stamateanu
Well I tried both engine.addImportPath("C:/Qt/4.7.0-beta1/imports/Qt/multimedia"); and engine.addPluginPath("C:/Qt/4.7.0-beta1/imports/Qt/multimedia"); and they do not change a thing. I still have to add the plugin by hand. Looking at preexisting paths reveals: importPathList contains one item

Re: [Qt-qml] Audio - Qt.multimedia

2010-06-16 Thread Romain Pokrzywka
Ah, yes that's normal, the path should be the top-level imports folder, ie. : engine.addImportPath("C:/Qt/4.7.0-beta1/imports"); and engine.addPluginPath("C:/Qt/4.7.0-beta1/imports"); (the QML engine builds the full path from the "Qt.multimedia" name of the plugin, similar to how java resolves

Re: [Qt-qml] Audio - Qt.multimedia

2010-06-20 Thread warwick.allison
> QDeclarativeEngine::importPlugin "Qt.multimedia" from > "C:/Qt/qtcreator-1.3.83/bin/Qt/multimedia/multimedia.dll" This is the real problem: multimedia.dll is being found in you Qt Creator bin directory. Sorry, no idea why. So really, neither should work, and the Qt Creator guys should fix this

Re: [Qt-qml] Audio - Qt.multimedia

2010-06-21 Thread Cristian Daniel Stamateanu
Thanks, in ubuntu it works perfectly. It seems like a windows bug. I hope it will be fixed till release of Qt 4.7 Regards, Cristi warwick.alli...@nokia.com wrote: >> QDeclarativeEngine::importPlugin "Qt.multimedia" from >> "C:/Qt/qtcreator-1.3.83/bin/Qt/multimedia/multimedia.dll" > > This is the

Re: [Qt-qml] Audio - Qt.multimedia

2010-06-22 Thread kai.koehne
qt-qml-boun...@trolltech.com wrote: >> QDeclarativeEngine::importPlugin "Qt.multimedia" from >> "C:/Qt/qtcreator-1.3.83/bin/Qt/multimedia/multimedia.dll" > > This is the real problem: multimedia.dll is being found in > you Qt Creator bin directory. Sorry, no idea why. Because he has launched 'tv