Advertisement
artemmarchenko

Untitled

Aug 24th, 2011
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. import QtQuick 1.0
  3.  
  4. Rectangle {
  5.     width: 400
  6.     height: 300
  7.     color: "lightyellow"
  8.  
  9.     Item {
  10.         id: page
  11.     }
  12.  
  13.     Item {
  14.         id: window
  15.         anchors.fill: parent
  16.  
  17.         Item {
  18.             id: windowRect
  19.             objectName: "windowRect"
  20.  
  21.             anchors.fill: parent
  22.  
  23.             property string current: ""
  24.             onCurrentChanged: setOpacities();
  25.  
  26.             function setOpacities() {
  27.                 console.log("w_length: " + stack.children.length);
  28.             }
  29.  
  30.  
  31.             Item {
  32.                 id: stack
  33.                 objectName: "stack"
  34.                 width: window.width
  35.                 anchors.fill: parent
  36.  
  37.                 function printChildren() {
  38.                     console.log("s_length: " + children.length)
  39.                 }
  40.             }
  41.         }
  42.  
  43.         Component.onCompleted: {
  44.             page.parent = stack
  45.             stack.printChildren()
  46.             windowRect.current = "page"
  47.             stack.printChildren()
  48.         }
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement