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. QT Creator - creating a QGraphicsVideoItem

QT Creator - creating a QGraphicsVideoItem

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 587 Views 3 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.
  • L Offline
    L Offline
    leo738
    wrote on last edited by
    #1

    Hello all,

    I'm using Qt Creator 4.11.0 Based on Qt 5.12.8 (GCC 9.3.0, 64 bit).

    I have a stacked widget that on one 'page' plays a video. I'd like to overlay text onto the video. I had tried using a QVideoWidget but was unable to obtain a transparent background on the text field. It seems that a QGraphicsVideoItem is the way to go.

    I've tried promoting a QWidget in Qt Creator to such a widget but without success. Could anyone please point me in the right direction?

    Thanks,

    Pl45m4P 1 Reply Last reply
    0
    • L leo738

      Hello all,

      I'm using Qt Creator 4.11.0 Based on Qt 5.12.8 (GCC 9.3.0, 64 bit).

      I have a stacked widget that on one 'page' plays a video. I'd like to overlay text onto the video. I had tried using a QVideoWidget but was unable to obtain a transparent background on the text field. It seems that a QGraphicsVideoItem is the way to go.

      I've tried promoting a QWidget in Qt Creator to such a widget but without success. Could anyone please point me in the right direction?

      Thanks,

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @leo738

      A QGraphicsVideoItem is used in a QGraphicsScene to display videos there. I don't think you are using a GraphicsScene?!


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      2
      • L Offline
        L Offline
        leo738
        wrote on last edited by
        #3

        @Pl45m4 said in QT Creator - creating a QGraphicsVideoItem:

        QGraphicsVideoItem

        Thanks for the reply.

        I was looking at the documentation & it doesn't seem to require a QGraphicsScene. I could be wrong however..

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

          Hi,

          The snippet of code you have in the documentation you linked does not create one explicitly however it makes use of one that was set on the QGraphicsView object that is shown there.

          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
          • L Offline
            L Offline
            leo738
            wrote on last edited by
            #5

            OK thanks.

            Is it possible to create such a widget on QT Creator?

            Is this the best solution for overlaying text onto video?

            Many thanks for any help,

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

              Not directly.

              As for the overlay part, see this stack overflow answer. It's in Python but easily translatable to C++.

              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
              • L Offline
                L Offline
                leo738
                wrote on last edited by
                #7

                Many thanks, I'll give it a shot.

                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