Skip to content

Make OBS UI Elements Accessible for KITE Tests

ludocosmo edited this page Feb 23, 2021 · 13 revisions

Main Window Buttons

OBS Main Window Buttons

Buttons "Start Streaming" and "Start Recording" are not accessible to KITE because they are checkable. To make them accessible to KITE, just remove the "checkable" property from file UI/forms/OBSBasic.ui

Diff UI/forms/OBSBasic.ui

Settings Buttons

Settings Buttons

Original widgets shown on the left are not buttons but a list of widgets in a QListWidget object which are not accessible to KITE. This QLisWidget object will be replaced by a QButtonGroup container which will contain QPushButtons, those push buttons are accessible to KITE.

File UI/forms/OBSBasicSettings.ui

Old version (to be removed)

      <widget class="QListWidget" name="listWidget">
       <property name="sizePolicy">
        <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
         <horstretch>0</horstretch>
         <verstretch>0</verstretch>
        </sizepolicy>
       </property>
       <property name="maximumSize">
        <size>
         <width>135</width>
         <height>16777215</height>
        </size>
       </property>
       <property name="iconSize">
        <size>
         <width>32</width>
         <height>32</height>
        </size>
       </property>
       <property name="currentRow">
        <number>0</number>
       </property>
       <item>
        <property name="text">
         <string>Basic.Settings.General</string>
        </property>
        <property name="icon">
         <iconset resource="obs.qrc">
          <normaloff>:/settings/images/settings/general.svg</normaloff>:/settings/images/settings/general.svg</iconset>
        </property>
       </item>
       <item>
        <property name="text">
         <string>Basic.Settings.Stream</string>
        </property>
        [...]
       </item>
       [...]
      </widget>

New version for KITE (to de added)

Note that each new QPushButton is added to a QButtonGroup through an attribute "buttongroup" having the name "basicSettingsButtonGroup".

        <widget class="QPushButton" name="SettingsGeneralButton">
         <property name="text">
          <string>Basic.Settings.General</string>
         </property>
         <property name="icon">
          <iconset resource="obs.qrc">
           <normaloff>:/settings/images/settings/general.svg</normaloff>:/settings/images/settings/general.svg</iconset>
         </property>
         <attribute name="buttonGroup">
          <string notr="true">basicSettingsButtonGroup</string>
         </attribute>
        </widget>
Clone this wiki locally