Development/Tutorials/Graphics/Migrate Qt Quick Controls 1: Difference between revisions

From KDE TechBase
(Created page with "== Import == <SyntaxHighlight lang="js"> import QtQuick.Controls 1.4 </SyntaxHighlight> to <SyntaxHighlight lang="js"> import QtQuick.Controls 2.8 </SyntaxHighlight> == Ico...")
(No difference)

Revision as of 20:22, 11 September 2019

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