Advertisement
Guest User

Untitled

a guest
Apr 8th, 2016
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 0.68 KB | None | 0 0
  1. import QtQuick 2.5
  2. import QtQuick.Window 2.2
  3. import QtQuick.Controls 1.4
  4. import QtQuick.Layouts 1.1
  5.  
  6. Window {
  7.     width: 800
  8.     height: 600
  9.     visible: true
  10.     title: 'window1'
  11.  
  12.     Loader {
  13.         id: winLoader
  14.         active: false
  15.         sourceComponent: NewWin {
  16.             visible: true
  17.         }
  18.  
  19.     }
  20.  
  21.     RowLayout {
  22.         anchors.centerIn: parent
  23.  
  24.         Button {
  25.             text: 'show window'
  26.             onClicked: {
  27.                 winLoader.active = false
  28.                 winLoader.active = true
  29.             }
  30.         }
  31.  
  32.         Button {
  33.             text: 'close window'
  34.             onClicked: winLoader.active = false
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement