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. Timeline widget
Forum Update on Monday, May 27th 2025

Timeline widget

Scheduled Pinned Locked Moved General and Desktop
11 Posts 4 Posters 19.6k 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.
  • S Offline
    S Offline
    Sorin
    wrote on last edited by
    #1

    I want to implement "this":http://img146.imageshack.us/img146/856/timelinecontrol.png control. I've implemented the ruler widget, Do you think that a QGraphicScene is good for the graphical part? the items can be expandable, movable...
    Thanks!

    There are only 10 types of people in the world: Those who understand binary, and those who don't

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      No. Use a plain QWidget (+ subwidgets).

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        [quote author="peppe" date="1292425576"]No. Use a plain QWidget (+ subwidgets).[/quote]
        Why?

        I think it could be done in either QML, GraphicsView or plain-old widgets. They all have their strongpoints.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Sorin
          wrote on last edited by
          #4

          forgot to add that I'll have a line over that control that will move horizontally over the control when I'll press a button. "This":http://img152.imageshack.us/img152/2108/finald.png is how the final widget should look,I've implemented the tree control too.

          There are only 10 types of people in the world: Those who understand binary, and those who don't

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dangelog
            wrote on last edited by
            #5

            [quote author="Andre" date="1292426686"][quote author="peppe" date="1292425576"]No. Use a plain QWidget (+ subwidgets).[/quote]
            Why?

            I think it could be done in either QML, GraphicsView or plain-old widgets. They all have their strongpoints.
            [/quote]

            I simply think that plain, good ol' QWidgets are simply what he needs: they're easy to draw in a style-compliant manner, they're easy to lay out properly (especially in a "grid" like fashion, without any strange transformation applied), they work in integer coordinates, they're fast, they don't require too much memory nor any gpu acceleration to work properly, etc.

            Of course, I'm not saying that it's an easy job -- such a complex widget will probably require a lot of time to be written and tested :)

            Software Engineer
            KDAB (UK) Ltd., a KDAB Group company

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              OK, so I guess it depends on the actual needs of Sorin. Personally, I think that if I'd have to write such a widget at this moment, I would give creating a widget based on a QDeclarativeView and implemented with QML serious considderation. That can be combined with custom drawing bits that need that, such as the wave forms. I don't see too many items in this widget where style compliance is of key importance.

              You name working with integers and not dealing with transformations a benefit, but I think it might be a drawback. If you have long timeline, zooming may be needed. Transformations are a real benefit to have available then, I think.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dangelog
                wrote on last edited by
                #7

                The problem is that you don't simply "zoom in" such widgets by transforming them. All the text and many other drawings must not be scaled when zooming in/out; the waveform and the ruler must change their level of detail while we zoom; we must guarrantee pixel exactness at each and every zoom factor; and so on. These things drive me to QWidget instead of QGraphicsView/QML.

                I know that it's perfectly doable even with them, and all in all, it's up to what one feels more comfortable to deal with :)
                That was my opinion and should be taken as such, and I don't want to make anyone change his/her mind :)

                Software Engineer
                KDAB (UK) Ltd., a KDAB Group company

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andre
                  wrote on last edited by
                  #8

                  I am quite open to having my mind changed by good arguments, so thanks for providing them! Providing arguments for all possible approaches can only help Sorin (or anyone else interested) in making the right choice for his or her use case.

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    jefa55
                    wrote on last edited by
                    #9

                    Hi.
                    I am facing the same problem than some of you. Wondering what's the best approach in order to develop an advanced timeline component, with images, graphics, texts, etc, within it, with zoom in/out capabilities, custom background/colors, etc.

                    Is there any sample code that i could use based on the discussion you had before in this thread? I assume is going to be some sort of mix of QTimeline, QSlider, QGraphics, and some other advanced graphics control usage.

                    hope you can help me and eventually, share some pieces of code.

                    thanks,

                    javier

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      andre
                      wrote on last edited by
                      #10

                      I don't know of anything concrete that came out of this discussion. However, you seem to have the wrong idea about what QTimeLine is. It is something to control animations, not a graphical widget.

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        jefa55
                        wrote on last edited by
                        #11

                        I know what QTimeLine is and his purpose. I am just trying to build an advanced timeline control (Widget?) built with advanced graphical components (images, text, etc) and have the timeline itself move over that complex graphic (something like Movie Maker or Sony Vegas does with his timeline moving over photos and videos you add to the project).

                        this is the sony vegas timeline for example, with several "channels" for audio and video. the vertical bar is where the time is:
                        !http://jefa55.zapto.org/images/vegas timeline.JPG(vegas timeline)!

                        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