title: PyQt5: Why am I unable to display pixmap?
body: <p>I am trying to display a <code>pixmap</code> in my application using the following code:</p>
  
  <pre><code>def add_controls(self):
      wid = QWidget(self)
      self.setCentralWidget(wid)
  
      pixmap = QPixmap("python.jpg")
      self.label = QLabel(self)
      self.label.setPixmap(pixmap)
  
      control_area = QVBoxLayout()  # centralWidget
  
      control_area.addWidget(self.label)
  
      wid.setLayout(control_area)
  </code></pre>
  
  <p>No Image is visible when I run this code, and no errors are present</p>
  
  <p>I have also tried using the full path to the image and still this was to no avail. I am launching the scripts from Pycharm 2019.1.1.</p>
  
  <p>AM I doing something wrong here? Any suggestions would be appreciated</p>
  
  <hr>
  
  <p>'Full' Code, just in case this is needed.</p>
  
  <pre><code>def setup_UI(self):
      # Add file menu
      menubar = self.menuBar()
      filemenu = menubar.addMenu('File')
      windowmenu = menubar.addMenu('Window')
  
      help_act = QAction('Open Help', self)
      folder_act = QAction('Open Folder', self)
      theme_act = QAction('Toggle light/dark theme', self)
  
      folder_act.setShortcut('Ctrl+D')
      help_act.setShortcut('Ctrl+H')
      theme_act.setShortcut('Ctrl+T')
  
      filemenu.addAction(folder_act)
      filemenu.addAction(help_act)
      windowmenu.addAction(theme_act)
  
      help_act.triggered.connect(self.open_help)
      folder_act.triggered.connect(self.add_files)
      theme_act.triggered.connect(self.toggle_colors)
  
      self.createTable()
      self.add_controls()
  
      self.setWindowTitle(self.title)
      self.setGeometry(self.left, self.top, self.width, self.height)
      self.toggle_colors()
      self.show()
  
  def add_controls(self):
      wid = QWidget(self)
      self.setCentralWidget(wid)
  
      # Add song controls
      volumeslider = QSlider(Qt.Horizontal, self)
      volumeslider.setFocusPolicy(Qt.NoFocus)
      volumeslider.valueChanged[int].connect(self.change_volume)
      volumeslider.setValue(100)
  
      play_btn = QPushButton('Play')  # play button
      pause_btn = QPushButton('Pause')  # pause button
      stop_btn = QPushButton('Stop')  # stop button
  
      # Add playlist controls
      prev_btn = QPushButton('Prev')
      shuffle_btn = QPushButton('Shuffle')
      next_btn = QPushButton('Next')
      sort_btn = QPushButton('Sort')
      search_btn = QPushButton('Search')
      remove_btn = QPushButton('Remove')
  
      pixmap = QPixmap("python.jpg")
      self.label = QLabel(self)
      self.label.setPixmap(pixmap)
  
      # Add button layouts
      control_area = QVBoxLayout()  # centralWidget
      controls = QHBoxLayout()
      playlist_ctrl_layout = QHBoxLayout()
      playlist_func = QHBoxLayout()
  
      self.cb1 = QComboBox()
      self.cb1.addItem("Sort by Title")
      self.cb1.addItem("Sort by Album")
      self.cb1.addItem("Sort by Artist")
      self.cb1.currentIndexChanged.connect(self.selectionchange)
  
      self.cb2 = QComboBox()
      self.cb2.addItem("Search by Title")
      self.cb2.addItem("Search by Album")
      self.cb2.addItem("Search by Artist")
      self.cb2.currentIndexChanged.connect(self.selectionchange)
  
      # Add buttons to song controls layout
      controls.addWidget(play_btn)
      controls.addWidget(pause_btn)
      controls.addWidget(stop_btn)
  
      # Add buttons to playlist controls layout
      playlist_ctrl_layout.addWidget(prev_btn)
      playlist_ctrl_layout.addWidget(shuffle_btn)
      playlist_ctrl_layout.addWidget(next_btn)
  
      playlist_func.addWidget(search_btn)
      playlist_func.addWidget(remove_btn)
  
      # Add to vertical layout
      control_area.addLayout(controls)
      control_area.addLayout(playlist_ctrl_layout)
      control_area.addLayout(playlist_func)
      control_area.addWidget(volumeslider)
      control_area.addWidget(self.tableWidget)
      control_area.addWidget(self.cb1)
      control_area.addWidget(self.label)
  
      wid.setLayout(control_area)
  
      # Connect each signal to their appropriate function
      play_btn.clicked.connect(self.play_handler)
      pause_btn.clicked.connect(self.pause_handler)
      stop_btn.clicked.connect(self.stop_handler)
  
      prev_btn.clicked.connect(self.prev_song)
      shuffle_btn.clicked.connect(self.shuffle_list)
      next_btn.clicked.connect(self.next_song)
  
      sort_btn.clicked.connect(self.sort_handler)
      search_btn.clicked.connect(self.search_handler)
      remove_btn.clicked.connect(self.remove_handler)
  
      self.statusBar()
  </code></pre>