On Wednesday, April 24, 2013 10:47:37 PM Albert Astals Cid wrote: > El Dimecres, 24 d'abril de 2013, a les 15:31:39, Michael Spencer va escriure: > > On Wednesday, April 24, 2013 08:40:18 PM Albert Astals Cid wrote: > > > El Dimecres, 24 d'abril de 2013, a les 12:49:09, Michael Spencer va > > > > escriure: > > > > In the Plasma tutorial [1], there is mention of extensions that let me > > > > using Q/KIcons and localization. I tried adding the path used by > > > > qmlview, > > > > and it worked, except for the i18n() function, which doesn't give an > > > > error but just returns an empty string. > > > > > > Returns an empty string or an untranslated one? > > > > Empty. I ended up fixing that by importing: > > > > import org.kde.qtextracomponents 0.1 > > import org.kde.plasma.core 0.1 as PlasmaCore > > import org.kde.plasma.components 0.1 as PlasmaComponents > > > > Are these intended for only Plasma widgets or can I use them in a regular > > application? > > KTouch seems to be using them so it should be fine
I've started looking through the sources for KTouch, and it looks like a great example to use. Thanks! > > > > > So what is the best way to access localization features and KIcons > > > > from > > > > QML? > > > > > > Using kdeclarative. > > > > What about the description of the package as provided by Ubuntu, saying > > that it is not suitable for a production environment? Where is > > documentation for KDeclarative? I've tried searching the API site but it > > can't find > > KDeclarative. > > I don't know about the description or the api, but it's what we have for > i18n and KIcons in QML. It appears that the imports I mentioned before provide i18n and access to KIcons, so why would I choose KDeclarative over that? KTouch uses QML, but appears (from what I've seen so far) to only use imports from Plasma, and doesn't use KDeclarative at all. Are there any programs that use KDeclarative so I can learn how to use it? -- Michael Spencer https://iBeliever.github.io >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
