feat(Storybook): Drag and drop pages to QtCreator

This commit is contained in:
Michał Cieślak 2023-10-03 13:56:56 +02:00 committed by Michał
parent 75dd3f7cb6
commit 15fcdc9314
1 changed files with 14 additions and 0 deletions

View File

@ -21,6 +21,20 @@ ListView {
width: ListView.view.width
Drag.dragType: Drag.Automatic
Drag.active: dragArea.drag.active
Drag.mimeData: {
"text/uri-list": `file:${pagesFolder}/${model.title}Page.qml`
}
MouseArea {
id: dragArea
anchors.fill: parent
drag.target: this
acceptedButtons: Qt.RightButton
}
TextMetrics {
id: textMetrics
text: root.unfoldedPrefix