Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-82732

QPaintEngineState.penNeedsResolving () requires an argument

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.14.0
    • GUI: Painting
    • None
    • Windows

    Description

       

      import os
      import PySide2
      from PySide2 import QtWidgets , QtGui
      import sys
      dirname  =  os.path.dirname(PySide2.__file__)
      plugin_path  =  os.path.join(dirname, 'plugins', 'platforms')
      os.environ['QT_QPA_PLATFORM_PLUGIN_PATH']  =  plugin_path
      def main():
          
          if QtWidgets.QApplication.instance() is None:
              app = QtWidgets.QApplication([])
          else:
              app = QtWidgets.QApplication.instance()
         
          print(QtGui.QPaintEngineState.penNeedsResolving())     
          sys.exit(app.exec_())
      if __name__ ==  "__main__":
          main()

       
      this error occurs.

       

      TypeError: descriptor 'penNeedsResolving' of 'PySide2.QtGui.QPaintEngineState' object needs an Argument

       

      and, the same error occurs. in the case of brushNeedsResolving.

      According to API documentation, they don't require any argument.

      Cite of API:

      PySide.QtGui.QPaintEngineState.brushNeedsResolving()

      Return type: PySide.QtCore.bool

      Returns whether the coordinate of the fill have been specified as bounded by the current rendering operation and have to be resolved (about the currently rendered primitive).

       

      PySide.QtGui.QPaintEngineState.penNeedsResolving()

      Return type: PySide.QtCore.bool

      Returns whether the coordinate of the stroke have been specified as bounded by the current rendering operation and have to be resolved (about the currently rendered primitive).

       

      Oh, my fault.

      I should have made an instance at the first time.

       

      state = QtGui.QPaintEngineState()
      pen = state.penNeedsResolving()
      print(pen)
      

       

      but, nothing Returns.

      I have carelessly repored without error. 

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            nori Harunori Fujimoto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes