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
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
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::
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:
>
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
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
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
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
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
> 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
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
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
12 matches
Mail list logo