Connecting to Data Engine in QT Quick

Mark markg85 at gmail.com
Sun Jan 22 13:41:11 UTC 2012


On Sun, Jan 22, 2012 at 7:27 AM, Shaun Reich <shaun.reich at kdemail.net>wrote:

> On Sat, Jan 21, 2012 at 11:53 PM, Eric Mesa <ericsbinaryworld at gmail.com>
> wrote:
> > Working with QT Quick in QT Creator.  Using QML to do GUI design.
>  Finally
> > figured out my data engine issues that I emailed about about back in
> August.
> >  So now I want to connect to my data engine.  I found this
> > website:
> http://techbase.kde.org/Development/Tutorials/Plasma/QML/API#Data_Engines
> > but when I put in  "import org.kde.plasma.core 0.1 as PlasmaCore" (no
> > quotes) I get the error "module "org.kde.plasma.core" is not installed"
>
> that import is only valid if you are making a plasmoid. through a raw
> QML thingy you can't use core components. core components is only
> meant as a plasmoid goodie bag.
>
> you can still use org.kde.plasmacomponents afik though. but if you're
> using a dataengine in the first place...and a QML applet..i have to
> ask why it isn't a plasmoid in the first place. probably make things a
> lot easier...
>
> as for 'packages', the imports are in
> kde-runtime/plasma/declarativeimports, so having that should be fine.
>
> I have to correct you there :)
You can perfectly use the plasma imports of you let QML know about the path.
Just add "QML_IMPORT_PATH += /path/to/plasmacomponents" (lookup the right
path please, don't know it out of my head) and you can start using
plasmacomponents in your qml app.

It's that easy!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120122/e4727739/attachment.html>


More information about the Plasma-devel mailing list