Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.14.0
-
None
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.