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. Scrolling part of a GraphicsView
Forum Updated to NodeBB v4.3 + New Features

Scrolling part of a GraphicsView

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 384 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.
  • W Offline
    W Offline
    wrosecrans
    wrote on last edited by
    #1

    I am trying to figure out a clever way to make something that looks a bit like the timeline in Premiere:
    https://www.mediacollege.com/adobe/premiere/version/pro-cs5/images/workspace/PPRO-CS5_Timeline_02.gif

    An arbitrary number of rows of content, but the left section always stays constant, while you can scroll left and right through the right section where the actual clips are. If I make one big QGraphicsScene with a bunch of Items, I can probably keep the left and right sections easily at the same height. But if I scroll the scene, the gutter on the left will scroll offscreen. If I make multiple GraphicsScenes, I can set up one to scroll but not the other. But it seems like it would be complicated to keep things consistent so that the rows always lined up, for example if I needed to wrap some content in the gutter on the left the height of that row would be increased, and I would need to write code to keep things in sync. That sync would need to be bidirectional, if the user adjusted the height of a track, the gutter on the left would need to be updated, etc.

    What's the best way to approach this sort of pattern? Widget layouts would do it, but I think I want the flexibility of something like GraphicsScene for the contents so I can drag items around, etc.

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

      Hi,

      The thing makes me think of the Frozen Column Example which is item view based rather a graphics view.

      You might want to check the kdenlive project for some more ideas.

      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
      1

      • Login

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