第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

更改QTableView的滾動方向

更改QTableView的滾動方向

瀟湘沐 2021-04-08 14:15:15
我一直在環(huán)顧四周,但似乎找不到任何示例可以幫助我在.NET中更改滾輪的滾動方向QTableView。這是我最好的嘗試。這是我做的水平滾動:def eventFilter(self, obj, event):    #some of my widgets are disabled, I can simply do another if for enabled ones    if obj and obj.isEnabled() and event.type() == QEvent.Wheel and self.shift_key:        newEvent = QWheelEvent(obj.mapToParent(event.pos()), event.globalPos(),                               event.delta(), event.buttons(),                               event.modifiers(), 1)        QApplication.instance().postEvent(obj.parent(), newEvent)        return True    if event.type() == QEvent.KeyPress and event.key() == Qt.Key_Shift:        self.shift_key = True        return True    elif event.type() == QEvent.KeyRelease and event.key() == Qt.Key_Shift:        self.shift_key = False        return True    return QObject.eventFilter(self, obj, event)當我將鼠標懸停在標題或空白處時會出現(xiàn)問題,因為它不會水平滾動,并且還會顯示一條錯誤消息QApplication::postEvent: Unexpected null receiver如何使用scroll+實現(xiàn)水平滾動shift?
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 233 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號