日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

qml 鼠标点击_QML ListView在鼠标点击时不会响应

發(fā)布時間:2025/3/12 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 qml 鼠标点击_QML ListView在鼠标点击时不会响应 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

大家好,我已經嘗試了幾件事,但我不能讓我的ListView響應鼠標點擊。

這是我的ListView代碼:

ListView {

id: listview1

x: 0

y: 82

// width: 574

// height: 967

width: window.width

height: window.height

visible: true

keyNavigationWraps: false

boundsBehavior: Flickable.DragAndOvershootBounds

opacity: 1

maximumFlickVelocity: 2500

anchors.leftMargin: 0

highlightMoveSpeed: 489

contentWidth: 0

preferredHighlightEnd: 2

spacing: 5

highlightRangeMode: ListView.NoHighlightRange

snapMode: ListView.SnapToItem

anchors.bottomMargin: 0

anchors.rightMargin: 0

anchors.topMargin: 82

anchors.fill: parent

model: myModel

delegate:Component {

//id: contactDelegate

Item {

property variant myData: model

width: 574; height: 90

Column {

x: 12

y: 0

width: 562

height: 90

anchors.rightMargin: 0

anchors.bottomMargin: 0

anchors.leftMargin: 12

anchors.topMargin: 0

anchors.fill: parent

spacing: 2

Text { text: 'ID: ' + id_korisnika ; verticalAlignment: Text.AlignTop; wrapMode: Text.NoWrap; horizontalAlignment: Text.AlignHCenter; color:"steelblue"; font.family: "Helvetica"; font.pointSize: 10 }

Text { text: 'Ime: ' + ime_korisnika ; horizontalAlignment: Text.AlignHCenter; color:"steelblue"; font.family: "Helvetica"; font.pointSize: 10 }

Text { text: 'Prezime: ' + prezime_korisnika; horizontalAlignment: Text.AlignHCenter; color:"steelblue"; font.family: "Helvetica"; font.pointSize: 10 }

Text { height: 16; text: 'Broj telefona: ' + broj_korisnika ; verticalAlignment: Text.AlignVCenter; horizontalAlignment: Text.AlignHCenter; color:"steelblue"; font.family: "Helvetica"; font.pointSize: 10 }

Text { text: 'Adresa: ' + adresa_korisnika ; horizontalAlignment: Text.AlignHCenter; color:"steelblue"; font.family: "Helvetica"; font.pointSize: 10 }

MouseArea {

id: mouse_area1

z: 1

hoverEnabled: false

anchors.fill: parent

}

}

}

}

//delegate: contactDelegate

highlight: Rectangle {color:"black"; radius: 5; opacity: 0.7

}

focus: true

}我試圖把我的代碼放在所有的areeas中,但是我無法使它工作。任何建議都很好。

總結

以上是生活随笔為你收集整理的qml 鼠标点击_QML ListView在鼠标点击时不会响应的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。