Имеется 2 MouseArea
, когда я делаю drag для одной, я не могу одновременно делать drag и для другой, хотя они никак не связаны друг с другом, даже не на одном уровне находятся, не говоря уже родителях.
Компилирую под Android.
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
ApplicationWindow {
visible: true
width: 640
height: 480
Rectangle
{
anchors.fill: parent
Rectangle
{
anchors.bottom: parent.bottom
anchors.left: parent.left
width: 120
height: 200
Rectangle
{
id:contollerForce
width: 60
height: 160
color: "lightgray"
opacity: 0.2
border.color: "black"
border.width: 3
radius: width*0.5
anchors.centerIn: parent
MouseArea
{
anchors.fill: parent
drag.target: contollerForcePoint
drag.axis: Drag.YAxis
drag.minimumY: parent.y-contollerForcePoint.height/4-3.5
drag.maximumY: parent.height-contollerForcePoint.height-4
onReleased: contollerForcePoint.y = 55
}
Rectangle
{
id:contollerForcePoint
x: parent.width/2-width/2
y: parent.height/2-height/2
width: 50
height: 50
color: "gray"
opacity: 0.5
border.color: "black"
border.width: 1
radius: width*0.5
}
}
}
Rectangle
{
anchors.bottom: parent.bottom
anchors.right: parent.right
width: 200
height: 200
Rectangle
{
id:contollerRotate
width: 160
height: 60
color: "lightgray"
opacity: 0.2
border.color: "black"
border.width: 3
radius: width*0.5
anchors.centerIn: parent
MouseArea
{
anchors.fill: parent
drag.target: contollerRotatePoint
drag.axis: Drag.XAxis
drag.minimumX: parent.x-contollerRotatePoint.width/4-3.5
drag.maximumX: parent.width-contollerRotatePoint.width-4
onReleased: contollerRotatePoint.x = 55
}
Rectangle
{
id: contollerRotatePoint
x: parent.width/2-width/2
y: parent.height/2-height/2
width: 50
height: 50
color: "gray"
opacity: 0.5
border.color: "black"
border.width: 1
radius: width*0.5
}
}
}
}
}
Вопрос простой: как сделать их независимыми друг от друга?
Оборудование для ресторана: новинки профессиональной кухонной техники
Частный дом престарелых в Киеве: комфорт, забота и профессиональный уход
Проблема в том, что нужно клонировать svg элемент и добавить его в другом местеИспользую jquery clone(), но вместо элемента я получаю в html [Object, Object]
Текст небольшого размера, допустим 12px занимает на Opera/Chrome 80 пикселей в ширинуИ в пределах зума 50%-500% ширина меняется только в пределах сотых/тысячных