Command bar

Let’s begin by adding some more properties to Style for our command components:

readonly property color colourCommandBarBackground: "#cecece"
readonly property color colourCommandBarFont: "#131313"
readonly property color colourCommandBarFontDisabled: "#636363"
readonly property real heightCommandBar: heightCommandButton
readonly property int pixelSizeCommandBarIcon: 32
readonly property int pixelSizeCommandBarText: 12
readonly property real widthCommandButton: 80
readonly property real heightCommandButton: widthCommandButton

Next, create two new QML components in our UI project: CommandBar.qml and CommandButton.qml in cm-ui/components. Update components.qrc and move the new components into the /components prefix with aliases. ...

Get Learn Qt 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.