QListWidget拖放

setDragEnabled() 允许拖

setAcceptDrops()允许放

setDragDropMode(QAbstractItemView.DragDrop)设置拖拽模式

setSelectionMode(QAbstractItemView.ContiguousSelection)设置选中模式(shift ctr键搭配)

setViewMode(QListView.IconMode)设置列表外观

setResizeMode(QListView.Adjutst)列表调整后项也跟着调整

猜你喜欢

转载自www.cnblogs.com/zhuluqing/p/9062571.html