0
我必须在左右滑动时拥有一个手势功能,但我还需要显示列表视图,但是尽快看到左右滑动的功能。你将如何处理这个问题?ListView上的鼠标区域qt快速
这是我的程序中的一小段代码片段。
CustomGestureArea{
onSwipeRight:{
// do something
}
onSwipeLeft:{
// do something
}
// as soon as i put this in i loose the swipe functionality
ListView{
anchors.fill:parent
}
}
我在想制作另一个自定义手势类,其中将包括列表视图,我会设置模型和其他需要的信息列表视图属性别名为正常工作,但在刷卡起来向下滚动列表(正如普通列表视图功能所期望的那样)。但我不知道如何开始。我的想法是列出这个。
GestureAreaListView{
property alias list_model:list.model
// and all other needed properties etc
onSwipeRight:{
// do my custom function
}
onSwipeLeft:{
// do my custom function
}
onSwipeUp:{
// do List view scroll up
}
onSwipeDown:{
// do List view scroll down
}
// as soon as i put this in i loose the swipe functionality
ListView{
anchors.fill:parent
}
ListView{
id: list
}
}
林几乎可以肯定,我尝试过这一点,它没有工作,但通过采取以上,只是修复了所有我的问题的办法。非常感谢你 – TheMan68