Development/Tutorials/Graphics/Migrate Qt Quick Controls 1

From KDE TechBase
Revision as of 20:22, 11 September 2019 by Guoyunhe (talk | contribs) (Created page with "== Import == <SyntaxHighlight lang="js"> import QtQuick.Controls 1.4 </SyntaxHighlight> to <SyntaxHighlight lang="js"> import QtQuick.Controls 2.8 </SyntaxHighlight> == Ico...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Import

import QtQuick.Controls 1.4

to

import QtQuick.Controls 2.8

Icon

Button {
    iconName: "file-new"
    iconSource: "my-file-new.svg"
}

to

Button {
    icon.name: "file-new"
    icon.source: "my-file-new.svg"
}

ToolTip

Button {
    tooltip: "Create new file"
}

to

Button {
    ToolTip.visible: hovered
    ToolTip.text: "Create new file"
}

Examples