Wow that is possible ha?
I tried it on the nightly builds I use and as all plugins build on the non nightly builds I get errors that Qt wants ints but python is giving it floats. Thus requires explicit int(casting)
Python 3.10.7: G:\Backup\02Krita\build\Nightly\bin\krita.exe
Sat Apr 22 10:24:22 2023
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
C:\Users\Nikola\AppData\Roaming\krita\pykrita\blender_layer\navigateWidget.py in paintEvent(self=<blender_layer.navigateWidget.NavigateWidget object>, e=<PyQt5.QtGui.QPaintEvent object>)
291 painter.setBrush(self.palette().light())
292 painter.drawEllipse(QPointF(x, y), r3, r3);
293 instance.icon('tool_zoom').paint(painter, x - s * 0.5, y - s * 0.5, s2, s2, Qt.AlignCenter, QIcon.Normal if self.isEnabled() else QIcon.Disabled)
294 if self.highlight == 2:
295 painter.setBrush(brush)
global instance = <PyKrita.krita.Krita object>
instance.icon = <built-in method icon of Krita object>
).paint undefined
painter = <PyQt5.QtGui.QPainter object>
x = 225.0
s = 20.7
y = 21.0
s2 = 22.5
global Qt = <class 'PyQt5.QtCore.Qt'>
Qt.AlignCenter = 132
global QIcon = <class 'PyQt5.QtGui.QIcon'>
QIcon.Normal = 0
self = <blender_layer.navigateWidget.NavigateWidget object>
self.isEnabled = <built-in method isEnabled of NavigateWidget object>
QIcon.Disabled = 1
TypeError: arguments did not match any overloaded call:
paint(self, QPainter, QRect, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.AlignCenter, mode: QIcon.Mode = QIcon.Normal, state: QIcon.State = QIcon.Off): argument 2 has unexpected type 'float'
paint(self, QPainter, int, int, int, int, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.AlignCenter, mode: QIcon.Mode = QIcon.Normal, state: QIcon.State = QIcon.Off): argument 2 has unexpected type 'float'
__cause__ = None
__class__ = <class 'TypeError'>
__context__ = None
__delattr__ = <method-wrapper '__delattr__' of TypeError object>
__dict__ = {}
__dir__ = <built-in method __dir__ of TypeError object>
__doc__ = 'Inappropriate argument type.'
__eq__ = <method-wrapper '__eq__' of TypeError object>
__format__ = <built-in method __format__ of TypeError object>
__ge__ = <method-wrapper '__ge__' of TypeError object>
__getattribute__ = <method-wrapper '__getattribute__' of TypeError object>
__gt__ = <method-wrapper '__gt__' of TypeError object>
__hash__ = <method-wrapper '__hash__' of TypeError object>
__init__ = <method-wrapper '__init__' of TypeError object>
__init_subclass__ = <built-in method __init_subclass__ of type object>
__le__ = <method-wrapper '__le__' of TypeError object>
__lt__ = <method-wrapper '__lt__' of TypeError object>
__ne__ = <method-wrapper '__ne__' of TypeError object>
__new__ = <built-in method __new__ of type object>
__reduce__ = <built-in method __reduce__ of TypeError object>
__reduce_ex__ = <built-in method __reduce_ex__ of TypeError object>
__repr__ = <method-wrapper '__repr__' of TypeError object>
__setattr__ = <method-wrapper '__setattr__' of TypeError object>
__setstate__ = <built-in method __setstate__ of TypeError object>
__sizeof__ = <built-in method __sizeof__ of TypeError object>
__str__ = <method-wrapper '__str__' of TypeError object>
__subclasshook__ = <built-in method __subclasshook__ of type object>
__suppress_context__ = False
__traceback__ = <traceback object>
args = ("arguments did not match any overloaded call:\n p...Icon.Off): argument 2 has unexpected type 'float'",)
with_traceback = <built-in method with_traceback of TypeError object>
The above is a description of an error in a Python program. Here is
the original traceback:
Traceback (most recent call last):
File "C:\Users\Nikola\AppData\Roaming\krita\pykrita\blender_layer\navigateWidget.py", line 293, in paintEvent
instance.icon('tool_zoom').paint(painter, x - s * 0.5, y - s * 0.5, s2, s2, Qt.AlignCenter, QIcon.Normal if self.isEnabled() else QIcon.Disabled)
TypeError: arguments did not match any overloaded call:
paint(self, QPainter, QRect, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.AlignCenter, mode: QIcon.Mode = QIcon.Normal, state: QIcon.State = QIcon.Off): argument 2 has unexpected type 'float'
paint(self, QPainter, int, int, int, int, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.AlignCenter, mode: QIcon.Mode = QIcon.Normal, state: QIcon.State = QIcon.Off): argument 2 has unexpected type 'float'


