title: PyQt5 implement a simple ImageViewer (menu + image)
body: <p>i'm beginner in PyQt. I want to create window with simple menu and label with image.
  I searched how to create menu and how to show image in label, but can't combine these 2 things. </p>
  
  <p>Code for menu(image doesn't display):</p>
  
  <pre><code>import sys
  from PyQt5 import QtCore, QtWidgets
  from PyQt5.QtWidgets import *
  from PyQt5.QtGui import *
  import cv2
  
  
  class MainWindow(QMainWindow):
      def __init__(self):
          QMainWindow.__init__(self)
          label = QLabel(self)
          pixmap = QPixmap('./liver.bmp')
          label.setPixmap(pixmap)
          self.resize(pixmap.width(), pixmap.height())
          # Create new action
          openAction = QAction(QIcon('open.png'), '&amp;Open', self)
          openAction.setShortcut('Ctrl+O')
          openAction.setStatusTip('Open document')
          openAction.triggered.connect(self.openCall)
  
          # Create menu bar and add action
          menuBar = self.menuBar()
          fileMenu = menuBar.addMenu('&amp;File')
          fileMenu.addAction(openAction)
  
  
      def openCall(self):
          pixmap = QPixmap('./default.png')
          label.setPixmap(pixmap)
  
  
  if __name__ == "__main__":
      app = QtWidgets.QApplication(sys.argv)
      mainWin = MainWindow()
      mainWin.show()
      sys.exit( app.exec_() )
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/NqQtF.png" rel="nofollow noreferrer">screenshot(image doesn't display)</a></p>
  
  <p>Code without menu with displayed image:</p>
  
  <pre><code>import os
  import sys
  from PyQt5.QtCore import *
  from PyQt5.QtGui import *
  from PyQt5.QtWidgets import *
  import cv2
  
  
  class ImageViewer(QWidget):
  
      def __init__(self):
          QWidget.__init__(self)
          self.setup_ui()
  
      def setup_ui(self):
          self.image_label = QLabel()
          self.image_label.setPixmap(QPixmap('./default.png'))
  
          self.main_layout = QVBoxLayout()  # adding widgets to layot
          self.main_layout.addWidget(self.image_label)
  
          self.setLayout(self.main_layout)  # set layot
  
  
  if __name__ == "__main__":
      app = QApplication(sys.argv)
      viewer = ImageViewer()
      viewer.show()
  app.exec_()
  </code></pre>
  
  <p>How to combine these 2 things????</p>