Development/Tutorials/Graphics/Migrate Qt Quick Controls 1

Jump to: navigation, search

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"
}

ExclusiveGroup

ExclusiveGroup { id: filterGroup}

Button {
    exclusiveGroup: filterGroup
}
Button {
    exclusiveGroup: filterGroup
}

to

ButtonGroup { id: filterGroup}

Button {
    ButtonGroup.group: filterGroup
}
Button {
    ButtonGroup.group: filterGroup
}

SplitView

You need at least Qt 5.13 and QtQuick.Controls 2.13. For older system, this might not be supported. You can use RowLayout/ColumnLayout instead if you want to lower system requirements.

Examples


This page was last edited on 13 September 2019, at 19:47. Content is available under Creative Commons License SA 4.0 unless otherwise noted.