python+ffpyplayer制作的视频播放程序第六篇

我先把布局代码分享一下,文件名称为:video_MainWindow.ui,大家可以直接通过QTDesigner工具编辑,里面涉及一些图标,图片等大家可以自己在QTDesigner创建资源。

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>VideoMainWindow</class>
 <widget class="QMainWindow" name="VideoMainWindow">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>890</width>
    <height>726</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>视频播放器</string>
  </property>
  <property name="windowIcon">
   <iconset resource="../../../../resources/qrc/image.qrc">
    <normaloff>:/icons/raspberry.jpg</normaloff>:/icons/raspberry.jpg</iconset>
  </property>
  <widget class="QWidget" name="centralwidget">
   <property name="sizePolicy">
    <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
    </sizepolicy>
   </property>
   <property name="styleSheet">
    <string notr="true"/>
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout_3">
    <item>
     <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,8">
      <item>
       <widget class="QListView" name="play_list"/>
      </item>
      <item>
       <layout class="QVBoxLayout" name="verticalLayout_2" stretch="8,2">
        <item>
         <widget class="QFrame" name="playerFrame">
          <property name="sizePolicy">
           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
          <property name="styleSheet">
           <string notr="true">background-color: rgb(85, 170, 255);
background-image: url(:/backimg/backimg.jpg);</string>
          </property>
          <layout class="QHBoxLayout" name="horizontalLayout_4"/>
         </widget>
        </item>
        <item>
         <layout class="QHBoxLayout" name="horizontalLayout">
          <item>
           <widget class="QFrame" name="frame_3">
            <property name="styleSheet">
             <string notr="true">background-color: rgb(255, 85, 127);</string>
            </property>
            <property name="frameShape">
             <enum>QFrame::Shape::StyledPanel</enum>
            </property>
            <property name="frameShadow">
             <enum>QFrame::Shadow::Raised</enum>
            </property>
            <layout class="QVBoxLayout" name="verticalLayout" stretch="4,6">
             <property name="sizeConstraint">
              <enum>QLayout::SizeConstraint::SetNoConstraint</enum>
             </property>
             <item>
              <widget class="QFrame" name="frame">
               <property name="frameShape">
                <enum>QFrame::Shape::StyledPanel</enum>
               </property>
               <property name="frameShadow">
                <enum>QFrame::Shadow::Raised</enum>
               </property>
               <layout class="QHBoxLayout" name="horizontalLayout_5" stretch="14,1">
                <item>
                 <widget class="Slider" name="viderPalyerSlider">
                  <property name="orientation">
                   <enum>Qt::Orientation::Horizontal</enum>
                  </property>
                 </widget>
                </item>
                <item>
                 <widget class="BodyLabel" name="videoTimelabel">
                  <property name="styleSheet">
                   <string notr="true">background-color: rgb(255, 255, 127);</string>
                  </property>
                  <property name="text">
                   <string/>
                  </property>
                 </widget>
                </item>
               </layout>
              </widget>
             </item>
             <item>
              <widget class="QFrame" name="frame_2">
               <property name="styleSheet">
                <string notr="true">background-color: rgb(85, 170, 255);</string>
               </property>
               <property name="frameShape">
                <enum>QFrame::Shape::StyledPanel</enum>
               </property>
               <property name="frameShadow">
                <enum>QFrame::Shadow::Raised</enum>
               </property>
               <layout class="QHBoxLayout" name="horizontalLayout_6">
                <item>
                 <widget class="PushButton" name="playBtn">
                  <property name="text">
                   <string>播放</string>
                  </property>
                  <property name="icon">
                   <iconset resource="../../../../resources/qrc/image.qrc">
                    <normaloff>:/icons/banana.jpg</normaloff>:/icons/banana.jpg</iconset>
                  </property>
                 </widget>
                </item>
                <item>
                 <widget class="PushButton" name="stopBtn">
                  <property name="text">
                   <string>停止</string>
                  </property>
                 </widget>
                </item>
                <item>
                 <widget class="PushButton" name="pauseBtn">
                  <property name="text">
                   <string>暂停</string>
                  </property>
                 </widget>
                </item>
                <item>
                 <widget class="PushButton" name="muteBtn">
                  <property name="text">
                   <string>静音</string>
                  </property>
                 </widget>
                </item>
                <item>
                 <widget class="PushButton" name="vol_pBtn">
                  <property name="text">
                   <string>调大声音</string>
                  </property>
                 </widget>
                </item>
                <item>
                 <widget class="PushButton" name="vol_bBtn">
                  <property name="text">
                   <string>调小声音</string>
                  </property>
                 </widget>
                </item>
                <item>
                 <widget class="PushButton" name="seek_bBtn">
                  <property name="text">
                   <string>后退</string>
                  </property>
                 </widget>
                </item>
                <item>
                 <widget class="PushButton" name="seek_pBtn">
                  <property name="text">
                   <string>前进</string>
                  </property>
                 </widget>
                </item>
               </layout>
              </widget>
             </item>
            </layout>
           </widget>
          </item>
         </layout>
        </item>
       </layout>
      </item>
     </layout>
    </item>
   </layout>
  </widget>
  <widget class="QMenuBar" name="menubar">
   <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <width>890</width>
     <height>21</height>
    </rect>
   </property>
   <widget class="RoundMenu" name="FileMenus">
    <property name="title">
     <string>文件</string>
    </property>
    <addaction name="openDir"/>
    <addaction name="openFile"/>
    <addaction name="actionquite"/>
   </widget>
   <widget class="QMenu" name="editMenus">
    <property name="title">
     <string>编辑</string>
    </property>
   </widget>
   <addaction name="FileMenus"/>
   <addaction name="editMenus"/>
  </widget>
  <widget class="QStatusBar" name="statusbar"/>
  <action name="openDir">
   <property name="text">
    <string>打开目录</string>
   </property>
  </action>
  <action name="openFile">
   <property name="text">
    <string>打开文件</string>
   </property>
  </action>
  <action name="actionquite">
   <property name="text">
    <string>退出</string>
   </property>
  </action>
 </widget>
 <customwidgets>
  <customwidget>
   <class>PushButton</class>
   <extends>QPushButton</extends>
   <header>qfluentwidgets.h</header>
  </customwidget>
  <customwidget>
   <class>RoundMenu</class>
   <extends>QMenu</extends>
   <header>qfluentwidgets.h</header>
  </customwidget>
  <customwidget>
   <class>Slider</class>
   <extends>QSlider</extends>
   <header>qfluentwidgets</header>
  </customwidget>
  <customwidget>
   <class>BodyLabel</class>
   <extends>QLabel</extends>
   <header>qfluentwidgets.h</header>
  </customwidget>
 </customwidgets>
 <resources>
  <include location="../../../../resources/qrc/image.qrc"/>
 </resources>
 <connections/>
</ui>

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值