O'Reilly logo

Qt 5 Projects by Marco Piccolino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding the Background color selector and the grab image button

Adding the Background color selector and the grab image button is just more of the same:

// cccomposer/main.qml...Window {    ...    Rectangle {            ...            Button {                text: "remove element"                anchors.horizontalCenter: parent.horizontalCenter            }            GroupBox {                id: backgroundSelector                title: "Background color:"                width: parent.width                readonly property string backgroundColor:                    backgroundGroup.checkedButton.objectName                ButtonGroup {                    id: backgroundGroup                    buttons: backgroundButtons.children                }                Column {                    id: backgroundButtons                    RadioButton {                        id: blackButton                        objectName: "black"                        text: "black"                    }                    RadioButton {                        id: greyButton                        objectName: "grey"                        text: "grey"                        checked: true                    }                    RadioButton {                        id: whiteButton objectName: "white" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required