[Interest] Focus Scope messing up QML dialog

Christopher Probst christop.probst at gmail.com
Wed Jan 31 22:45:08 CET 2018


Hello Everybody,


Taken the example from the documentation here:

Dialog {
    id: dateDialog
    visible: true
    title: "Choose a date"
    standardButtons: StandardButton.Save | StandardButton.Cancel

    onAccepted: console.log("Saving the date " +
        calendar.selectedDate.toLocaleDateString())

    Calendar {
        id: calendar
        onDoubleClicked: dateDialog.click(StandardButton.Save)
    }
}


I added a FocusScope like this:

Dialog {
        id: dateDialog
        visible: true
        title: "Choose a date"
        standardButtons: StandardButton.Save | StandardButton.Cancel

        onAccepted: console.log("Saving the date " +
                                calendar.selectedDate.toLocaleDateString())

        FocusScope{
            Calendar {
                id: calendar
                onDoubleClicked: dateDialog.click(StandardButton.Save)
            }
        }
    }


And it messes the appearance of the dialog. The Dialog when it appears
is simply to small to show all of is children appropriately. What am I
not understanding?

Thanks,

Christopher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180131/ff003062/attachment.html>


More information about the Interest mailing list