title: PyQT5 change QPushButton's StyleSheet at runtime
body: <p><strong>What I want to do:</strong> I want to change the StyleSheet background-image of a button during a second when it is clicked and then return it to it's original StyleSheet. I illustrate this with the images bellow.</p>
  <p><a href="https://i.stack.imgur.com/Dxiyo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dxiyo.png" alt="enter image description here" /></a> --button pressed--&gt;<a href="https://i.stack.imgur.com/TGpcX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TGpcX.png" alt="enter image description here" /></a>--1 second--&gt; <a href="https://i.stack.imgur.com/1Stmg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Stmg.png" alt="enter image description here" /></a></p>
  <p><strong>My problem:</strong> Although I can change it one time with this:</p>
  <pre><code>def bt_start_pressed(self):
          print('start')
          self.bt_start.setStyleSheet(&quot;background-image: url(:/resource/start-.png);&quot;)
          answer_on = write_to_plc('@00WD0000000152*')
          print(answer_on)
  </code></pre>
  <p>If I try to encorporate both changes of StyleSheet (change from original gray to the green lime then to gray again) like the code below, no changes to the background-image StyleSheet occur, but everything else in the code works normally. Note: the button gets initialized with the grey image.</p>
  <pre><code>    def bt_start_pressed(self):
          print('start')
          self.bt_start.setStyleSheet(&quot;background-image: url(:/resource/start-.png);&quot;)
          answer_on = write_to_plc('@00WD0000000152*')
          print(answer_on)
          print('start2')
          time.sleep(1)
          self.bt_start.setStyleSheet(&quot;background-image: url(:/resource/start.png);&quot;)
          answer_off = write_to_plc('@00WD0000000053*')
          print(answer_off)
  </code></pre>
  <p>I believe the snippets above are enough, in case you want to see everything in detail, the code is bellow:</p>
  <p>The main script</p>
  <pre><code>from PyQt5 import QtWidgets, uic
  import pbl3_rc
  import sys
  import serial
  import time
  
  ser = serial.Serial('COM4', bytesize=7, parity='E', stopbits=2, baudrate=9600)
  
  
  class Ui(QtWidgets.QMainWindow):
      def __init__(self):
          super(Ui, self).__init__() # Call the inherited classes __init__ method
          uic.loadUi('PBL3_designer.ui', self) # Load the .ui file
  
          self.bt_start = self.findChild(QtWidgets.QPushButton, 'bt_start')
          self.bt_start.clicked.connect(self.bt_start_pressed)
          self.bt_stop = self.findChild(QtWidgets.QPushButton, 'bt_stop')
          self.bt_stop.clicked.connect(self.bt_stop_pressed)
          self.bt_motorForward = self.findChild(QtWidgets.QPushButton, 'bt_motorForward')
          self.bt_motorForward.clicked.connect(self.bt_motorForward_pressed)
          self.bt_motorBackward = self.findChild(QtWidgets.QPushButton, 'bt_motorBackwards')
          self.bt_motorBackward.clicked.connect(self.bt_motorBackward_pressed)
          self.bt_velUp = self.findChild(QtWidgets.QPushButton, 'bt_velUp')
          self.bt_velUp.clicked.connect(self.bt_velUp_pressed)
          self.bt_velDown = self.findChild(QtWidgets.QPushButton, 'bt_velDown')
          self.bt_velDown.clicked.connect(self.bt_velDown_pressed)
  
          self.show() # Show the GUI
  
      def bt_start_pressed(self):
          print('start')
          self.bt_start.setStyleSheet(&quot;background-image: url(:/resource/start-.png);&quot;)
          answer_on = write_to_plc('@00WD0000000152*')
          print(answer_on)
          print('start2')
          time.sleep(1)
          self.bt_start.setStyleSheet(&quot;background-image: url(:/resource/start.png);&quot;)
          answer_off = write_to_plc('@00WD0000000053*')
          print(answer_off)
  
      def bt_stop_pressed(self):
          print('stop')
          self.bt_stop.setStyleSheet(&quot;background-image: url(:/resource/stop-.png);&quot;)
          answer_on = write_to_plc('@00WD0002000150*')
          print(answer_on)
          time.sleep(1)
          self.bt_stop.setStyleSheet(&quot;background-image: url(:/resource/stop.png);&quot;)
          answer_off = write_to_plc('@00WD0002000051*')
          print(answer_off)
          print('stop2')
  
      def bt_motorForward_pressed(self):
          print('forward')
          self.bt_motorForward.setStyleSheet(&quot;background-image: url(:/resource/motorForward-.png);&quot;)
          answer_on = write_to_plc('@00WD0003000151*')
          print(answer_on)
          time.sleep(1)
          self.bt_motorForward.setStyleSheet(&quot;background-image: url(:/resource/motorForward.png);&quot;)
          answer_off = write_to_plc('@00WD0003000050*')
          print(answer_off)
          print('forward2')
  
      def bt_motorBackward_pressed(self):
          print('backward')
          self.bt_motorBackward.setStyleSheet(&quot;background-image: url(:/resource/motorBackwards-.png);&quot;)
          answer_on = write_to_plc('@00WD0004000156*')
          print(answer_on)
          time.sleep(1)
          self.bt_motorBackward.setStyleSheet(&quot;background-image: url(:/resource/motorBackwards.png);&quot;)
          answer_off = write_to_plc('@00WD0004000057*')
          print(answer_off)
          print('backward2')
  
      def bt_velUp_pressed(self):
          print('velUp')
          self.bt_velUp.setStyleSheet(&quot;background-image: url(:/resource/velUp-.png);&quot;)
          answer_on = write_to_plc('@00WD0005000157*')
          print(answer_on)
          time.sleep(1)
          self.bt_velUp.setStyleSheet(&quot;background-image: url(:/resource/velUp.png);&quot;)
          answer_off = write_to_plc('@00WD0005000056*')
          print(answer_off)
          print('velUp2')
  
      def bt_velDown_pressed(self):
          print('velDown')
          self.bt_velDown.setStyleSheet(&quot;background-image: url(:/resource/velDown-.png);&quot;)
          answer_on = write_to_plc('@00WD0006000154*')
          print(answer_on)
          time.sleep(1)
          self.bt_velDown.setStyleSheet(&quot;background-image: url(:/resource/velDown.png);&quot;)
          answer_off = write_to_plc('@00WD0006000055*')
          print(answer_off)
          print('velDown2')
  
  
  def write_to_plc(trama):
      s = (trama + chr(13)).encode('utf8')
      ser.write(s)
      serial.timeout = 0.1
      resposta = (ser.read_until(chr(13), size=10))
      serial.timeout = 0.1
      return resposta
  
  
  app = QtWidgets.QApplication(sys.argv)
  window = Ui()
  app.exec_()
  </code></pre>
  <p>And the .ui code is</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;ui version=&quot;4.0&quot;&gt;
   &lt;class&gt;MainWindow&lt;/class&gt;
   &lt;widget class=&quot;QMainWindow&quot; name=&quot;MainWindow&quot;&gt;
    &lt;property name=&quot;geometry&quot;&gt;
     &lt;rect&gt;
      &lt;x&gt;0&lt;/x&gt;
      &lt;y&gt;0&lt;/y&gt;
      &lt;width&gt;800&lt;/width&gt;
      &lt;height&gt;556&lt;/height&gt;
     &lt;/rect&gt;
    &lt;/property&gt;
    &lt;property name=&quot;windowTitle&quot;&gt;
     &lt;string&gt;MainWindow&lt;/string&gt;
    &lt;/property&gt;
    &lt;widget class=&quot;QWidget&quot; name=&quot;centralwidget&quot;&gt;
     &lt;widget class=&quot;QLabel&quot; name=&quot;picbox_set_cinza1&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;70&lt;/x&gt;
        &lt;y&gt;370&lt;/y&gt;
        &lt;width&gt;101&lt;/width&gt;
        &lt;height&gt;101&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string/&gt;
      &lt;/property&gt;
      &lt;property name=&quot;pixmap&quot;&gt;
       &lt;pixmap resource=&quot;pbl3.qrc&quot;&gt;:/resource/set_box.png&lt;/pixmap&gt;
      &lt;/property&gt;
      &lt;property name=&quot;scaledContents&quot;&gt;
       &lt;bool&gt;true&lt;/bool&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QPushButton&quot; name=&quot;bt_velUp&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;710&lt;/x&gt;
        &lt;y&gt;320&lt;/y&gt;
        &lt;width&gt;41&lt;/width&gt;
        &lt;height&gt;41&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;styleSheet&quot;&gt;
       &lt;string notr=&quot;true&quot;&gt;background-image: url(:/resource/velUp.png);&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string/&gt;
      &lt;/property&gt;
      &lt;property name=&quot;flat&quot;&gt;
       &lt;bool&gt;true&lt;/bool&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QPushButton&quot; name=&quot;bt_velDown&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;710&lt;/x&gt;
        &lt;y&gt;370&lt;/y&gt;
        &lt;width&gt;41&lt;/width&gt;
        &lt;height&gt;41&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;styleSheet&quot;&gt;
       &lt;string notr=&quot;true&quot;&gt;background-image: url(:/resource/velDown.png);&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string/&gt;
      &lt;/property&gt;
      &lt;property name=&quot;flat&quot;&gt;
       &lt;bool&gt;true&lt;/bool&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QPushButton&quot; name=&quot;bt_motorBackwards&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;600&lt;/x&gt;
        &lt;y&gt;340&lt;/y&gt;
        &lt;width&gt;41&lt;/width&gt;
        &lt;height&gt;41&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;styleSheet&quot;&gt;
       &lt;string notr=&quot;true&quot;&gt;background-image: url(:/resource/motorBackwards.png);&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string/&gt;
      &lt;/property&gt;
      &lt;property name=&quot;flat&quot;&gt;
       &lt;bool&gt;true&lt;/bool&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QPushButton&quot; name=&quot;bt_stop&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;690&lt;/x&gt;
        &lt;y&gt;220&lt;/y&gt;
        &lt;width&gt;41&lt;/width&gt;
        &lt;height&gt;41&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;styleSheet&quot;&gt;
       &lt;string notr=&quot;true&quot;&gt;background-image: url(:/resource/stop.png);&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string/&gt;
      &lt;/property&gt;
      &lt;property name=&quot;flat&quot;&gt;
       &lt;bool&gt;true&lt;/bool&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QLabel&quot; name=&quot;picbox_logo&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;580&lt;/x&gt;
        &lt;y&gt;10&lt;/y&gt;
        &lt;width&gt;101&lt;/width&gt;
        &lt;height&gt;101&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string&gt;LogoEmpresa&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=&quot;scaledContents&quot;&gt;
       &lt;bool&gt;true&lt;/bool&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QLabel&quot; name=&quot;picbox_set_cinza2&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;220&lt;/x&gt;
        &lt;y&gt;370&lt;/y&gt;
        &lt;width&gt;101&lt;/width&gt;
        &lt;height&gt;101&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string/&gt;
      &lt;/property&gt;
      &lt;property name=&quot;pixmap&quot;&gt;
       &lt;pixmap resource=&quot;pbl3.qrc&quot;&gt;:/resource/set_box.png&lt;/pixmap&gt;
      &lt;/property&gt;
      &lt;property name=&quot;scaledContents&quot;&gt;
       &lt;bool&gt;true&lt;/bool&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QLabel&quot; name=&quot;lbl_set_cinza1&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;80&lt;/x&gt;
        &lt;y&gt;340&lt;/y&gt;
        &lt;width&gt;91&lt;/width&gt;
        &lt;height&gt;20&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;font&quot;&gt;
       &lt;font&gt;
        &lt;family&gt;Yu Gothic UI Semibold&lt;/family&gt;
        &lt;weight&gt;75&lt;/weight&gt;
        &lt;bold&gt;true&lt;/bold&gt;
       &lt;/font&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string&gt;1º Conjunto Cinza&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QLabel&quot; name=&quot;lbl_set_cinza2&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;230&lt;/x&gt;
        &lt;y&gt;340&lt;/y&gt;
        &lt;width&gt;91&lt;/width&gt;
        &lt;height&gt;20&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;font&quot;&gt;
       &lt;font&gt;
        &lt;family&gt;Yu Gothic UI Semibold&lt;/family&gt;
        &lt;weight&gt;75&lt;/weight&gt;
        &lt;bold&gt;true&lt;/bold&gt;
       &lt;/font&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string&gt;2º Conjunto Cinza&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QProgressBar&quot; name=&quot;progbar_set_cinza2&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;220&lt;/x&gt;
        &lt;y&gt;480&lt;/y&gt;
        &lt;width&gt;118&lt;/width&gt;
        &lt;height&gt;23&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;value&quot;&gt;
       &lt;number&gt;0&lt;/number&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QPushButton&quot; name=&quot;bt_start&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;630&lt;/x&gt;
        &lt;y&gt;220&lt;/y&gt;
        &lt;width&gt;41&lt;/width&gt;
        &lt;height&gt;41&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;styleSheet&quot;&gt;
       &lt;string notr=&quot;true&quot;&gt;background-image: url(:/resource/start-.png);
  background-image: url(:/resource/start.png);&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string/&gt;
      &lt;/property&gt;
      &lt;property name=&quot;flat&quot;&gt;
       &lt;bool&gt;true&lt;/bool&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QLabel&quot; name=&quot;pb_robotinoPose&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;80&lt;/x&gt;
        &lt;y&gt;60&lt;/y&gt;
        &lt;width&gt;451&lt;/width&gt;
        &lt;height&gt;211&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string&gt;TextLabel&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QProgressBar&quot; name=&quot;progbar_set_cinza1&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;80&lt;/x&gt;
        &lt;y&gt;480&lt;/y&gt;
        &lt;width&gt;118&lt;/width&gt;
        &lt;height&gt;23&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;value&quot;&gt;
       &lt;number&gt;0&lt;/number&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QPushButton&quot; name=&quot;bt_close&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;720&lt;/x&gt;
        &lt;y&gt;530&lt;/y&gt;
        &lt;width&gt;75&lt;/width&gt;
        &lt;height&gt;23&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string&gt;Close&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QLabel&quot; name=&quot;lbl_set_cores&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;380&lt;/x&gt;
        &lt;y&gt;340&lt;/y&gt;
        &lt;width&gt;101&lt;/width&gt;
        &lt;height&gt;20&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;font&quot;&gt;
       &lt;font&gt;
        &lt;family&gt;Yu Gothic UI Semibold&lt;/family&gt;
        &lt;weight&gt;75&lt;/weight&gt;
        &lt;bold&gt;true&lt;/bold&gt;
       &lt;/font&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string&gt;Conjunto Colorido&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QPushButton&quot; name=&quot;bt_motorForward&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;650&lt;/x&gt;
        &lt;y&gt;340&lt;/y&gt;
        &lt;width&gt;41&lt;/width&gt;
        &lt;height&gt;41&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;styleSheet&quot;&gt;
       &lt;string notr=&quot;true&quot;&gt;background-image: url(:/resource/motorForward.png);&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string/&gt;
      &lt;/property&gt;
      &lt;property name=&quot;flat&quot;&gt;
       &lt;bool&gt;true&lt;/bool&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QProgressBar&quot; name=&quot;progbar_set_cores1&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;380&lt;/x&gt;
        &lt;y&gt;480&lt;/y&gt;
        &lt;width&gt;118&lt;/width&gt;
        &lt;height&gt;23&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;value&quot;&gt;
       &lt;number&gt;0&lt;/number&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QLabel&quot; name=&quot;picbox_set_cores2&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;370&lt;/x&gt;
        &lt;y&gt;370&lt;/y&gt;
        &lt;width&gt;101&lt;/width&gt;
        &lt;height&gt;101&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string/&gt;
      &lt;/property&gt;
      &lt;property name=&quot;pixmap&quot;&gt;
       &lt;pixmap resource=&quot;pbl3.qrc&quot;&gt;:/resource/set_box.png&lt;/pixmap&gt;
      &lt;/property&gt;
      &lt;property name=&quot;scaledContents&quot;&gt;
       &lt;bool&gt;true&lt;/bool&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=&quot;QLabel&quot; name=&quot;picbox_logoIPCA&quot;&gt;
      &lt;property name=&quot;geometry&quot;&gt;
       &lt;rect&gt;
        &lt;x&gt;690&lt;/x&gt;
        &lt;y&gt;10&lt;/y&gt;
        &lt;width&gt;101&lt;/width&gt;
        &lt;height&gt;101&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=&quot;text&quot;&gt;
       &lt;string/&gt;
      &lt;/property&gt;
      &lt;property name=&quot;pixmap&quot;&gt;
       &lt;pixmap resource=&quot;pbl3.qrc&quot;&gt;:/resource/logoIPCA.png&lt;/pixmap&gt;
      &lt;/property&gt;
      &lt;property name=&quot;scaledContents&quot;&gt;
       &lt;bool&gt;true&lt;/bool&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
    &lt;/widget&gt;
   &lt;/widget&gt;
   &lt;resources&gt;
    &lt;include location=&quot;pbl3.qrc&quot;/&gt;
    &lt;include location=&quot;../../.designer/backup/pbl3.qrc&quot;/&gt;
   &lt;/resources&gt;
   &lt;connections/&gt;
  &lt;/ui&gt;
  </code></pre>