Qt World Summit: Register Today!

EditMenu failed after TextFieldStyle is set

  • Hi guys,

    I meet a strange problem. When I assign a TextFieldStyle to TextField (like the qml code below), the EditMenu (Copy/Paste/Select) will not popup in anyways. But, if I do not assign anything to style, the popup EditMenu works again. Anyone has a solution?

    Thank you.

        TextField { 
            id: input;
            anchors.fill: parent
            style: TextFieldStyle {
               background: Rectangle {
                    color: "yellow"
                    selectedTextColor: "#ffcc66"
            width: 200; 
            height: 40;
            font.pixelSize: 25
            maximumLength: 256
            focus: true; 
            selectByMouse: true; 
            clip: true;

Log in to reply