GroupBox.qml 1.34 KB
Newer Older
1
2
3
4
import Qt 4.6
import Bauhaus 1.0

QExtGroupBox {
5
    id: groupBox;
6
7
8
9
10
11
12
13

    property var finished;

    property var caption;

    property var oldMaximumHeight;

    onFinishedChanged: {
14
        checkBox.raise();
15
16
17
18
        maximumHeight = height;
        oldMaximumHeight = maximumHeight;
        visible = false;
        visible = true;
19
        //x = 6;
20
21
22
23
    }

    QToolButton {
        //QCheckBox {
24
        id: checkBox;
25

26
        text: groupBox.caption;
27
        focusPolicy: "Qt::NoFocus";
28
        styleSheetFile: "specialCheckBox.css";
29
30
31
        y: 0;		
        x: 0;
        fixedHeight: 17
32
        fixedWidth: groupBox.width;
33
34
35
36
37
38
39
        arrowType: "Qt::DownArrow";
        toolButtonStyle: "Qt::ToolButtonTextBesideIcon";
        checkable: true;
        checked: true;
        font.bold: true;
        onClicked: {
            if (checked) {
40
                //groupBox.maximumHeight = oldMaximumHeight;
41
                collapsed = false;
42
43
44
                //text = "";
                //width = 12;
				//width = 120;
45
                arrowType =  "Qt::DownArrow";
46
				visible = true;
47
                } else {
48
                //groupBox.maximumHeight = 20;
49
50

                collapsed = true;
51
                //text = groupBox.caption;
52
                visible = true;
53
                //width = 120;
54
55
56
57
58
                arrowType =  "Qt::RightArrow";
                }
        }
    }
}