LinuxCNC / linuxcnc

LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
http://linuxcnc.org/
GNU General Public License v2.0
1.73k stars 1.13k forks source link

fix float arg passed to QSize, caused Qt designer to crash when loading #2984

Closed tangentaudio closed 1 month ago

tangentaudio commented 1 month ago

When loading the qttouchy ui file into Qt Designer, it would crash:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/qtvcp/widgets/tab_widget.py", line 43, in tabSizeHint
    return QSize(size.width(), w)
           ^^^^^^^^^^^^^^^^^^^^^^
TypeError: arguments did not match any overloaded call:
  QSize(): too many arguments
  QSize(w: int, h: int): argument 2 has unexpected type 'float'
  QSize(a0: QSize): argument 1 has unexpected type 'int'

Fixed the 'w' argument by converting it to an int.

c-morley commented 1 month ago

Thank you.