class_docstr: Re-implementation of QGraphicsView that removes scrollbars and allows unambiguous control of the 
  viewed coordinate range. Also automatically creates a GraphicsScene and a central QGraphicsWidget
  that is automatically scaled to the full view geometry.
  
  This widget is the basis for :class:`PlotWidget <pyqtgraph.PlotWidget>`, 
  :class:`GraphicsLayoutWidget <pyqtgraph.GraphicsLayoutWidget>`, and the view widget in
  :class:`ImageView <pyqtgraph.ImageView>`.
  
  By default, the view coordinate system matches the widget's pixel coordinates and 
  automatically updates when the view is resized. This can be overridden by setting 
  autoPixelRange=False. The exact visible range can be set with setRange().
  
  The view can be panned using the middle mouse button and scaled using the right mouse button if
  enabled via enableMouse()  (but ordinarily, we use ViewBox for this functionality).
class_docstr_tok: ["Re-implementation","of","QGraphicsView","that","removes","scrollbars","and","allows","unambiguous","control","of","the","viewed","coordinate","range",".","Also","automatically","creates","a","GraphicsScene","and","a","central","QGraphicsWidget","that","is","automatically","scaled","to","the","full","view","geometry",".","This","widget","is","the","basis","for",":","class",":","`","PlotWidget","<","pyqtgraph.PlotWidget",">","`",",",":","class",":","`","GraphicsLayoutWidget","<","pyqtgraph.GraphicsLayoutWidget",">","`",",","and","the","view","widget","in",":","class",":","`","ImageView","<","pyqtgraph.ImageView",">","`",".","By","default",",","the","view","coordinate","system","matches","the","widget","'s","pixel","coordinates","and","automatically","updates","when","the","view","is","resized",".","This","can","be","overridden","by","setting","autoPixelRange=False",".","The","exact","visible","range","can","be","set","with","setRange","(",")",".","The","view","can","be","panned","using","the","middle","mouse","button","and","scaled","using","the","right","mouse","button","if","enabled","via","enableMouse","(",")","(","but","ordinarily",",","we","use","ViewBox","for","this","functionality",")","."]
docstr: ==============  ============================================================
  **Arguments:**
  parent          Optional parent widget
  useOpenGL       If True, the GraphicsView will use OpenGL to do all of its
                  rendering. This can improve performance on some systems,
                  but may also introduce bugs (the combination of 
                  QGraphicsView and QOpenGLWidget is still an 'experimental'
                  feature of Qt)
  background      Set the background color of the GraphicsView. Accepts any
                  single argument accepted by 
                  :func:`mkColor <pyqtgraph.mkColor>`. By 
                  default, the background color is determined using the
                  'backgroundColor' configuration option (see 
                  :func:`setConfigOptions <pyqtgraph.setConfigOptions>`).
  ==============  ============================================================
docstr_tok: ["==============","============================================================","*","*","Arguments",":","*","*","parent","Optional","parent","widget","useOpenGL","If","True",",","the","GraphicsView","will","use","OpenGL","to","do","all","of","its","rendering",".","This","can","improve","performance","on","some","systems",",","but","may","also","introduce","bugs","(","the","combination","of","QGraphicsView","and","QOpenGLWidget","is","still","an","'experimental'","feature","of","Qt",")","background","Set","the","background","color","of","the","GraphicsView",".","Accepts","any","single","argument","accepted","by",":","func",":","`","mkColor","<","pyqtgraph.mkColor",">","`",".","By","default",",","the","background","color","is","determined","using","the","'backgroundColor","'","configuration","option","(","see",":","func",":","`","setConfigOptions","<","pyqtgraph.setConfigOptions",">","`",")",".","==============","============================================================"]
code: def __init__(self, parent=None, useOpenGL=None, background="default"):
      """
      ==============  ============================================================
      **Arguments:**
      parent          Optional parent widget
      useOpenGL       If True, the GraphicsView will use OpenGL to do all of its
                      rendering. This can improve performance on some systems,
                      but may also introduce bugs (the combination of
                      QGraphicsView and QOpenGLWidget is still an 'experimental'
                      feature of Qt)
      background      Set the background color of the GraphicsView. Accepts any
                      single argument accepted by
                      :func:`mkColor <pyqtgraph.mkColor>`. By
                      default, the background color is determined using the
                      'backgroundColor' configuration option (see
                      :func:`setConfigOptions <pyqtgraph.setConfigOptions>`).
      ==============  ============================================================
      """
  
      self.closed = False
  
      QtWidgets.QGraphicsView.__init__(self, parent)
  
      # This connects a cleanup function to QApplication.aboutToQuit. It is
      # called from here because we have no good way to react when the
      # QApplication is created by the user.
      # See pyqtgraph.__init__.py
      from .. import _connectCleanup
  
      _connectCleanup()
  
      if useOpenGL is None:
          useOpenGL = getConfigOption("useOpenGL")
  
      self.useOpenGL(useOpenGL)
      self.setCacheMode(self.CacheModeFlag.CacheBackground)
  
      ## This might help, but it's probably dangerous in the general case..
      # self.setOptimizationFlag(self.DontSavePainterState, True)
  
      self.setBackgroundRole(QtGui.QPalette.ColorRole.NoRole)
      self.setBackground(background)
  
      self.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
      self.setFrameShape(QtWidgets.QFrame.Shape.NoFrame)
      self.setVerticalScrollBarPolicy(
          QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff
      )
      self.setHorizontalScrollBarPolicy(
          QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff
      )
      self.setTransformationAnchor(
          QtWidgets.QGraphicsView.ViewportAnchor.NoAnchor
      )
      self.setResizeAnchor(
          QtWidgets.QGraphicsView.ViewportAnchor.AnchorViewCenter
      )
      self.setViewportUpdateMode(
          QtWidgets.QGraphicsView.ViewportUpdateMode.MinimalViewportUpdate
      )
  
      self.lockedViewports = []
      self.lastMousePos = None
      self.setMouseTracking(True)
      self.aspectLocked = False
      self.range = QtCore.QRectF(0, 0, 1, 1)
      self.autoPixelRange = True
      self.currentItem = None
      self.clearMouse()
      self.updateMatrix()
      # GraphicsScene must have parent or expect crashes!
      self.sceneObj = GraphicsScene(parent=self)
      self.setScene(self.sceneObj)
  
      ## by default we set up a central widget with a grid layout.
      ## this can be replaced if needed.
      self.centralWidget = None
      self.setCentralItem(QtWidgets.QGraphicsWidget())
      self.centralLayout = QtWidgets.QGraphicsGridLayout()
      self.centralWidget.setLayout(self.centralLayout)
  
      self.mouseEnabled = False
      self.scaleCenter = False  ## should scaling center around view center (True) or mouse click (False)
      self.clickAccepted = False
  
imports: from ..None import functions
  from ..None import getConfigOption
  from ..GraphicsScene import GraphicsScene
  from ..Point import Point
  from ..Qt import QT_LIB, QtCore, QtGui, QtWidgets
label_desc: Use image node_id 1 to create a new GraphicsView object from inherited base classes: QtWidgets with example: obj = GraphicsView(parent, useOpenGL, background)