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. Anyway to display a video in a view delegate?
Forum Updated to NodeBB v4.3 + New Features

Anyway to display a video in a view delegate?

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

    Hello - using QtWidgets to display a list of image items. The images are placeholders for small video files. If the user selects one of the items in the list, I'd like the item to begin playing the video clip. Anyway to accomplish this in my delegate?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mclaus
      wrote on last edited by
      #2

      Well, I managed to get this working, but not in the way I had assumed/hoped it would work. Instead of playing video in the delegate, i created a QVideoWidget and parented it in the view. Then I used the selection changed signal from the view to reposition the video widget and start/stop the video playing. Also had to capture the value changed signal from the scroll bars to make the video widget visible only when the selected item is visible in the view.

      It works OK, but feels kind of like a hack to me. There ought to be some way to play the video from within the delegate, no? Then I wouldn't have to worry about all the repositioning and visibility stuff, cuz the view handles all that for me.

      Let me know if anybody has some ideas.

      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