Guest User

Untitled

a guest
Nov 16th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. import QtQuick 2.11
  2. import QtQuick.Controls 2.4
  3.  
  4. ApplicationWindow {
  5. id: root
  6. height: 480
  7. width: 640
  8. visible: true
  9.  
  10. MouseArea {
  11. anchors.fill: parent
  12. onDoubleClicked: {
  13. var w = otherWindowComponent.createObject(root)
  14. w.show()
  15. w.requestActivate() // same effect when removed
  16. }
  17. }
  18.  
  19. Component {
  20. id: otherWindowComponent
  21. ApplicationWindow {
  22. id: child
  23. width: 400
  24. height: 300
  25.  
  26. Rectangle {
  27. color: "blue"
  28. width: 100
  29. height: 100
  30. focus: true
  31. }
  32. }
  33. }
  34. }
Add Comment
Please, Sign In to add comment