title: Select region from an image but resizable QRubberBand doesn't resize
body: <p>I want to select a region from an image and get her coordinates. I have searched and I have found this code, it create object rubberband but I can't resize it.. weird, on linux (lubuntu) it's working but on macOS doesn't.. I want a version of a rubberband on macOS in special with those "grips", in macOS neither those grips doesn't appear.. and one more thing, it is possible to to move the rubberband rectangle by selecting with right click and move on image wherever I want, like moving an icon on desktop. Thanks!</p>
  
  <pre><code>import sys
  from PyQt5 import QtCore, QtGui, QtWidgets
  
  class ResizableRubberBand(QtWidgets.QWidget):
      def __init__(self, parent=None):
          super(ResizableRubberBand, self).__init__(parent)
          self.setWindowFlags(QtCore.Qt.SubWindow)
          layout = QtWidgets.QHBoxLayout(self)
          layout.setContentsMargins(0, 0, 0, 0)
          layout.addWidget(
              QtWidgets.QSizeGrip(self), 0,
              QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
          layout.addWidget(
              QtWidgets.QSizeGrip(self), 0,
              QtCore.Qt.AlignRight | QtCore.Qt.AlignBottom)
          self._band = QtWidgets.QRubberBand(
              QtWidgets.QRubberBand.Rectangle, self)
          self._band.show()
          self.show()
  
      def resizeEvent(self, event):
          size = QtCore.QSize(3, 4)
          size.scale(self.size(), QtCore.Qt.KeepAspectRatio)
          self.resize(size)
          self._band.resize(self.size())
  
  class Window(QtWidgets.QWidget):
      def __init__(self):
          super(Window, self).__init__()
          self.button = QtWidgets.QPushButton('Show Rubber Band')
          self.button.clicked.connect(self.handleButton)
          self.label = QtWidgets.QLabel()
          self.label.setScaledContents(True)
          self.label.setPixmap(QtGui.QPixmap('image.JPG'))
          layout = QtWidgets.QVBoxLayout(self)
          layout.addWidget(self.label)
          layout.addWidget(self.button)
  
      def handleButton(self):
          self.band = ResizableRubberBand(self.label)
          self.band.setGeometry(50, 50, 150, 300)
  
  if __name__ == '__main__':
  
      app = QtWidgets.QApplication(sys.argv)
      window = Window()
      window.setGeometry(800, 100, 600, 500)
      window.show()
      sys.exit(app.exec_())
  </code></pre>