2

I'm trying to use Controls2 Drawer to make a top-down drawer within a parent item. If I set edge.QtTopEdge, the program hangs. But it works for QtLeftEdge.

What am i doing wrong.

Here's the code,

import QtQuick 2.7
import QtQuick.Controls 2.1

ApplicationWindow
{
    visible: true
    width: 800
    height: 1024

    Item
    {
        id: area
        anchors.fill: parent
        Column
        {
            width: parent.width
            Rectangle
            {
                width: parent.width
                height: 100
                color: "blue"
            }

            Rectangle
            {
                id: yellowbit
                width: parent.width
                height: area.height - 100
                color: "yellow"
            }
        }
    }

   Drawer 
    {
        // i want to put the drawer within the "yellowbit"
        id: drawer
        width: yellowbit.width
        height: yellowbit.height
        parent: yellowbit

        // comment this out and it works as a left drawer
        // but as a top drawer, it hangs up
        edge: Qt.TopEdge

        Rectangle
        {
            anchors.fill: parent
            color: "red"
        }
    }
}

thanks for any help

jkj yuio
  • 2,543
  • 5
  • 32
  • 49

0 Answers0