[Interest] Qt Quick Controls 2 Button Fails in GridView

Mark R Youngquist mark.youngquist at vantagecontrols.com
Wed Mar 23 18:24:44 CET 2016


I've been enjoying my time with using the QtQuick Controls in the labs portion of Qt 5.6


I have a scenario where I use a GridView with a delegate Button component with a custom background property.  Once I run the application and scroll through the grid I receive several errors in my output and an equivalent number of blank spaces in the grid itself.  As soon as I remove my custom background, everything works great.  This occurs on both desktop and embedded builds.


The main.qml code is as follows:


import QtQuick 2.6
import Qt.labs.controls 1.0
ApplicationWindow {
    visible: true
    width: 640
    height: 480

    GridView {
        id: gridThing;
        anchors.fill: parent;
        cellWidth: 75;
        cellHeight: 75;
        model: 500;

        delegate: Button {
            id: control
            text: "Test"
            width: gridThing.cellWidth;
            height: gridThing.cellHeight;
            background: Rectangle {
                implicitHeight: 20;
                implicitWidth: 20;
                color: "red";
                width: control.width;
                height: control.height;
                x: 0;
                y: 0;
            }
        }
    }
}

Is anyone else experiencing this problem or have a recommendation for troubleshooting this?



________________________________

Ce message, ainsi que tous les fichiers joints à ce message, peuvent contenir des informations sensibles et/ ou confidentielles ne devant pas être divulguées. Si vous n'êtes pas le destinataire de ce message (ou que vous recevez ce message par erreur), nous vous remercions de le notifier immédiatement à son expéditeur, et de détruire ce message. Toute copie, divulgation, modification, utilisation ou diffusion, non autorisée, directe ou indirecte, de tout ou partie de ce message, est strictement interdite.
Se désabonner: Si vous souhaitez être retiré de notre liste de diffusion, s'il vous plaît envoyer vos coordonnées à CASL.unsubscribe at legrand.ca<mailto:casl.unsubscribe at legrand.ca> et indiquer quels sont les messages que vous ne souhaitez plus recevoir.


This e-mail, and any document attached hereby, may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized, direct or indirect, copying, disclosure, distribution or other use of the material or parts thereof is strictly forbidden.
Unsubscribe: If you would like to be removed from our mailing list, please send your contact information to CASL.unsubscribe at legrand.ca<mailto:casl.unsubscribe at legrand.ca> and indicate what messages you no longer wish to receive.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160323/b65ea2c4/attachment.html>


More information about the Interest mailing list