Can we include and show some others widgets in a QVideoWidget?

49 views Asked by At

I want to show some others widget in a QVideoWidget so that I can control the playing of video when fullscreen as this code:

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>VideoScreen</class>
 <widget class="QMainWindow" name="VideoScreen">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>800</width>
    <height>600</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>MainWindow</string>
  </property>
  <widget class="QVideoWidget" name="videoScreen">
   <widget class="QPushButton" name="play">
    <property name="geometry">
     <rect>
      <x>80</x>
      <y>240</y>
      <width>101</width>
      <height>31</height>
     </rect>
    </property>
    <property name="text">
     <string>Play</string>
    </property>
   </widget>
   <widget class="QPushButton" name="stop">
    <property name="geometry">
     <rect>
      <x>280</x>
      <y>170</y>
      <width>101</width>
      <height>31</height>
     </rect>
    </property>
    <property name="text">
     <string>Stop</string>
    </property>
   </widget>
  </widget>
 </widget>
 <customwidgets>
  <customwidget>
   <class>QVideoWidget</class>
   <extends>QWidget</extends>
   <header>QVideoWidget</header>
   <container>1</container>
  </customwidget>
 </customwidgets>
 <resources/>
 <connections/>
</ui>

enter image description here

(I created a .ui file using designer to show a QMainWindow. In that, I promoted the central widget to QVideoWidget as the image).
When I play a video, this just show the video, there are no others widget like buttons I added in designer.

I just want to ask that can we add widgets to a QVideoWidget then let them be show when showing a video?

0

There are 0 answers