[Interest] QtLabsControls Button - Invalid property name "label".

J-P Nurmi jpnurmi at qt.io
Mon Apr 25 10:31:01 CEST 2016

On 25 Apr 2016, at 10:01, Viktória Nemkin <viktoria.nemkin at gmail.com<mailto:viktoria.nemkin at gmail.com>> wrote:


I'm just starting out with the newly released QtLabsControls. I have tried using a Button and ran into a problem:

import QtQuick 2.0

import Qt.labs.controls 1.0

Button {

    label: Item {

        Text {

            text: "Example"


        Image {

            id: icon

            source: "qrc:/x.svg"




In this example QtCreator tells me "label" is an invalid property name.

According to the documentation here it is should exist:

What am I missing?


Are you using 5.7 beta? The Button::label property was replaced by a more generic Control::contentItem property. We’ve been reviewing, aligning and cleaning up the APIs so there are going to be some minor API differences between the tech preview in 5.6 beta and the final release in 5.7.0.

Button {
    contentItem: Item { … }

J-P Nurmi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160425/34a63578/attachment.html>

More information about the Interest mailing list