Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 1.09 KB | None | 0 0
  1. import QtQuick 2.13
  2. import QtQuick.Window 2.13
  3. import QtQuick.Controls 2.13
  4.  
  5. ApplicationWindow {
  6.     visible: true
  7.     width: 640
  8.     height: 480
  9.     title: qsTr("Hello World")
  10.  
  11.     Rectangle {
  12.  
  13.         width: 300
  14.         height: 300
  15.         color: "red"
  16.  
  17.         DragHandler {
  18.             // With TakeOverForbidden ListView win..but the button too!!
  19.             // grabPermissions: DragHandler.TakeOverForbidden
  20.  
  21.             // With CanTakeOverFromItems button lose...but ListView lose too!!
  22.             //grabPermissions: DragHandler.CanTakeOverFromItems
  23.         }
  24.  
  25.         ListView {
  26.             width: 100
  27.             height: 100
  28.             clip: true
  29.             model: 20
  30.             delegate: Button {
  31.                 text: "Should scroll"
  32.             }
  33.         }
  34.  
  35.         Button {
  36.             x: 100
  37.             text: "Should lose"
  38.         }
  39.  
  40.         Rectangle {
  41.             x: 200
  42.             width: 50
  43.             height: 50
  44.             color: "blue"
  45.             TapHandler {
  46.                 onTapped: console.log("Tapped")
  47.             }
  48.         }
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement