Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. QAbstractScrollArea example
Qt 6.11 is out! See what's new in the release blog

QAbstractScrollArea example

Scheduled Pinned Locked Moved Unsolved Qt for Python
5 Posts 3 Posters 721 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Purple Monsoon
    wrote on last edited by
    #1

    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().

    M 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I don't have such an example at hand but you might want to check the code of Kdenlive which contains that kind of widget.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Purple Monsoon
        wrote on last edited by
        #3

        I took a look. Unless

        grep -R QAbstractScrollArea

        is mistaken, nowhere does it subclass QAbstractScrollArea.

        SGaistS 1 Reply Last reply
        0
        • P Purple Monsoon

          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().

          M Offline
          M Offline
          mpergand
          wrote on last edited by
          #4

          @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.

          1 Reply Last reply
          0
          • P Purple Monsoon

            I took a look. Unless

            grep -R QAbstractScrollArea

            is mistaken, nowhere does it subclass QAbstractScrollArea.

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @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.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved