QAbstractScrollArea example
-
I'm interested in how to use QAbstractScrollArea, but can't figure it out from the documentation and can't find a working example to look at. (Trying to read the .cpp source code for QScrollArea was too hard for me as an example.)
What do I need for a minimal working example of QAbstractScrollArea (for example, have the contained widget just be a text label that displays e.g. (456,345) where the values come directly from the position of the scrollbar.
I'm interested, for example, in how very long timelines in DAWs and video editing applications are done, since I imagine it doesn't make sense to have a widget that is many times the width of the screen within a QScrollArea. (Perhaps I'm wrong about that.) In any case, I'm still curious about how and when to use a subclass of QAbstractScrollArea rather than QScrollArea.
Oh, and https://doc.qt.io/qtforpython/PySide6/QtWidgets/QScrollArea.html contains a typo in the example: "scrollArea = QScrollArea" is missing its parens().
-
I took a look. Unless
grep -R QAbstractScrollArea
is mistaken, nowhere does it subclass QAbstractScrollArea.
-
@Purple-Monsoon said in QAbstractScrollArea example:
I'm interested, for example, in how very long timelines in DAWs and video editing applications are done,
QScrollBar is more appropriate in that case.
Only data relative to the slider position are displayed. -
@Purple-Monsoon said in QAbstractScrollArea example:
I took a look. Unless
grep -R QAbstractScrollArea
is mistaken, nowhere does it subclass QAbstractScrollArea.
The goal is to look at how they implement their widget. I did not mean to imply that they are using QAbstractScrollArea.