Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Best way to create video/sound editor timeline
Forum Updated to NodeBB v4.3 + New Features

Best way to create video/sound editor timeline

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 970 Views
  • 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
    pnonell
    wrote on last edited by
    #1

    Hi! I'm new to Qt and QML GUI programming and I'm trying to make something similar to a video or sound editor timeline, where the user can move the blocks vertically through rows, horizontally through the time and resize them in length. This could be an example:

    fa3498ecf91a18abc2f3be41e365c9ff.png

    I'm stuck on which view structure to choose to develop this and maintain the model/view workflow. So far, I thought two options, but both present difficulties that I can't resolve:

    • Use a ListView with a ListModel where each ListElement is a row of the editor and each element can have several blocks with their origin point and length. The problem here is how to make a delegate capable of distributing each block along the row and maintain the possibility of dragging and resizing the block horizontally. Another thing to take into account is the facility to move blocks from one row to another.

    • Use a Rectangle element as the "blackboard" and have a model with the blocks as elements where each one has the horizontal and vertical position and its length. This would help to make it easier to drag and resize the blocks, but the problem is how to connect the model and its delegate with the Rectangle element since it is not a View element.

    As I said, I'm new to Qt and QML and I don't know if there is a better way to handle this. I'd appreciate it if someone could give me some suggestions on how to go about this.

    Thanks!

    Sara BaileyS 1 Reply Last reply
    0
    • P pnonell

      Hi! I'm new to Qt and QML GUI programming and I'm trying to make something similar to a video or sound editor timeline, where the user can move the blocks vertically through rows, horizontally through the time and resize them in length. This could be an example:

      fa3498ecf91a18abc2f3be41e365c9ff.png

      I'm stuck on which view structure to choose to develop this and maintain the model/view workflow. So far, I thought two options, but both present difficulties that I can't resolve:

      • Use a ListView with a ListModel where each ListElement is a row of the editor and each element can have several blocks with their origin point and length. The problem here is how to make a delegate capable of distributing each block along the row and maintain the possibility of dragging and resizing the block horizontally. Another thing to take into account is the facility to move blocks from one row to another.

      • Use a Rectangle element as the "blackboard" and have a model with the blocks as elements where each one has the horizontal and vertical position and its length. This would help to make it easier to drag and resize the blocks, but the problem is how to connect the model and its delegate with the Rectangle element since it is not a View element.

      As I said, I'm new to Qt and QML and I don't know if there is a better way to handle this. I'd appreciate it if someone could give me some suggestions on how to go about this.

      Thanks!

      Sara BaileyS Offline
      Sara BaileyS Offline
      Sara Bailey
      Banned
      wrote on last edited by
      #2
      This post is deleted!
      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