El Dimecres, 24 d'abril de 2013, a les 16:27:08, Michael Spencer va escriure:
> 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.

What do you mean KTouch doesn't use KDeclarative. What's this then?

kdeunstable@xps:~/ktouch:master$ wcgrep -i kdeclarative
./src/application.cpp:26:#include <kdeclarative.h>
./src/application.cpp:80:    KDeclarative kDeclarative;
./src/application.cpp:81:    
kDeclarative.setDeclarativeEngine(declarativeEngine);
./src/application.cpp:82:    kDeclarative.initialize();
./src/application.cpp:83:    kDeclarative.setupBindings();
./src/application.cpp:85:    QScriptEngine* engine = 
kDeclarative.scriptEngine();
./src/CMakeLists.txt:5:find_package(KDeclarative REQUIRED)
./src/CMakeLists.txt:112:target_link_libraries(ktouch ${KDECLARATIVE_LIBRARIES} 
${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KCMUTILS_LIBS} ${QT_QTCORE_LIBRARY} 
${QT_QTOPENGL_LIBRARY} ${QT_QTSCRIPT_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} 
${QT_QTXMLPATTERNS_LIBRARY} ${QT_QTSQL_LIBRARY})
./src/graph-plugin/CMakeLists.txt:17:target_link_libraries(graphplugin 
${KDE4_PLASMA_LIBS} ${QT_QTSCRIPT_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} 
${KDECLARATIVE_LIBRARIES})

Cheers,
  Albert

> 
> Are there any programs that use KDeclarative so I can learn how to use it?
> 
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe
> >> <<

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to