Unsolved QListView ignoring ScrollPerPixel on Sierra, High Sierra (Qt-5.12.0)
-
Hi there!
This simple pyqt example demonstrates the problem:
import time app = QApplication(sys.argv) w = QListView() m = QStringListModel() m.setStringList([str(time.time()) for i in range(1000)]) w.setModel(m) w.setVerticalScrollMode(QAbstractItemView.ScrollPerPixel) w.show() app.exec_()
-
No it doesn't. Where are your imports for the Qt framework? I've become a lot more demanding lately of examples incuding the necessary imports, instead of assuming folks know where all the components come from. It saves the respondent time, so think of it as a courtesy.
TIA
-
Thank you. Here is all of it:
import sys, time from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * app = QApplication(sys.argv) w = QListView() m = QStringListModel() m.setStringList([str(time.time()) for i in range(1000)]) w.setModel(m) w.setVerticalScrollMode(QAbstractItemView.ScrollPerPixel) w.show() app.exec_()
-
at least on 5.11 partial (pixel specific) scrolling does seem to work.
just ran it and behaved as expected.
Fedora29 linux
Qt 5.11 -
@Kent-Dorfman You are running linux. The report is that it doesn't work on Sierra, High Sierra. It works fine on Mojave, for example.
-
gotcha. not sure about MAC compatibility.
-
It looks like all QScrollAreas ignore ScrollPerPixel on Sierra. How is this possible?
-
@patrickkidd Turns out this is only doing this when macOS is a parallels guest OS, even for Mojave. Strange.
I wonder what this could be?