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 edit summary
Line 42: Line 42:
     ToolTip.visible: hovered
     ToolTip.visible: hovered
     ToolTip.text: "Create new file"
     ToolTip.text: "Create new file"
}
</SyntaxHighlight>
== ExclusiveGroup ==
<SyntaxHighlight lang="js">
ExclusiveGroup { id: filterGroup}
Button {
    exclusiveGroup: filterGroup
}
Button {
    exclusiveGroup: filterGroup
}
</SyntaxHighlight>
to
<SyntaxHighlight lang="js">
ButtonGroup { id: filterGroup}
Button {
    ButtonGroup.group: filterGroup
}
Button {
    ButtonGroup.group: filterGroup
}
}
</SyntaxHighlight>
</SyntaxHighlight>

Revision as of 08:28, 12 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"
}

ExclusiveGroup

ExclusiveGroup { id: filterGroup}

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

to

ButtonGroup { id: filterGroup}

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

Examples