Jump to content

Plasma/QtQuick2Porting

From KDE Community Wiki
Revision as of 00:26, 2 May 2013 by Sebas (talk | contribs) (move page here, update it)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

QtQuick2 porting

The Plasma Quick APIs have been ported to QtQuick2. This has been done with API compatibility in mind. Usually, it is pretty easy to get your QtQuick2 code running on top of QtQuick2 and Plasma2. This document guides you through the important changes in QtQuick2.

As of today (May 2nd 2013), most of the imports provided by the following modules have been ported:

  • org.kde.plasma.core (PlasmaCore)
  • org.kde.plasma.components (PlasmaComponents)
  • org.kde.plasma.extras (PlasmaExtras)
  • org.kde.qtextracomponents (QtExtras)
  • org.kde.locale
  • org.kde.draganddrop
  • org.kde.runnermanager


The API has been kept compatible to minimize the porting effort to Plasma2. With the following changes, you can get your code running on Plasma2:

  • Change import version numbers of all above components to 2.0
  • PlasmaCore.Theme: mSize has been removed, theme.defaultFont.pixelSize provides a good approximation
  • PlasmaCore.ToolTip: image property now takes a QString, which is passed as source into an Image item

Backwards compatible API Improvements:

  • PlasmaCore.ToolTip can now optionally include Components
  • PlasmaCore.MenuItem.icon now accepts icons as QString, as well as QIcon

Please note that the Plasma QtQuick 2 APIs are still subject to change. This document is work in progress.