Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QAbstractScrollArea or QGraphicsView
Forum Updated to NodeBB v4.3 + New Features

QAbstractScrollArea or QGraphicsView

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 486 Views 1 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
    pmckeon
    wrote on last edited by
    #1

    I want to make a scrolling timeline and piano roll like what is used in most DAW software.

    I have had a look at similar projects and related topics and generally they seem to subclass QAbstractScrollArea, however most of those are from 10 years ago and I am wondering if this is still the best way to do it. It seems from a glance that QGraphicsView would be equally suited to the task, but I don't know if it adds unnecessary overheads at the cost of convenience features.

    (Preempting the why not use QT Quick/QML crowd... I want an MDI structure for starters, certainly possible but more work for me, I've also done a lot of work with Android's Activity/Fragments framework in the past which is similar and that's not the direction I want to go).

    raven-worxR 1 Reply Last reply
    0
    • P pmckeon

      I want to make a scrolling timeline and piano roll like what is used in most DAW software.

      I have had a look at similar projects and related topics and generally they seem to subclass QAbstractScrollArea, however most of those are from 10 years ago and I am wondering if this is still the best way to do it. It seems from a glance that QGraphicsView would be equally suited to the task, but I don't know if it adds unnecessary overheads at the cost of convenience features.

      (Preempting the why not use QT Quick/QML crowd... I want an MDI structure for starters, certainly possible but more work for me, I've also done a lot of work with Android's Activity/Fragments framework in the past which is similar and that's not the direction I want to go).

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @pmckeon said in QAbstractScrollArea or QGraphicsView:

      It seems from a glance that QGraphicsView would be equally suited to the task, but I don't know if it adds unnecessary overheads at the cost of convenience features.

      no, QtQuick1 was based on the graphics view framework. Of course there is nothing wrong going this way

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      P 1 Reply Last reply
      0
      • raven-worxR raven-worx

        @pmckeon said in QAbstractScrollArea or QGraphicsView:

        It seems from a glance that QGraphicsView would be equally suited to the task, but I don't know if it adds unnecessary overheads at the cost of convenience features.

        no, QtQuick1 was based on the graphics view framework. Of course there is nothing wrong going this way

        P Offline
        P Offline
        pmckeon
        wrote on last edited by
        #3

        @raven-worx I haven't used the original QT Quick so I assume you mean to say that the graphics view framework is fairly well optimized and fast when it comes to 2D rendering?

        1 Reply Last reply
        0
        • P Offline
          P Offline
          pmckeon
          wrote on last edited by
          #4

          After fighting with QGraphicsView most of a day to make it do what I want I think in my case it is not a good fit and I'm better off using QAbstractScrollArea.

          My reasoning is with the former there seems to be a lot of setup in creating items to add to a scene, but with the latter I can basically use paintEvent to draw the scene and update based on custom logic for the scene.

          I shall mark this as solved.

          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