knipknap / better-tool-library

A FreeCAD addon and command line tool for managing tool libraries
MIT License
22 stars 11 forks source link

Fix issue between PySide5 and PySide6 #30

Closed Arm4g3ddon closed 5 months ago

Arm4g3ddon commented 5 months ago

Updated PySide API usage to support PySide6

This merge includes changes to the codebase to ensure compatibility with PySide6, the latest version of the PySide library. The updates primarily involve modifying the arguments passed to certain methods and handling the differences in the way certain features are implemented in PySide6 compared to PySide5. Key changes include:

  1. Updating the setTextInteractionFlags and setFocusPolicy methods in toolproperties.py to handle the different enumerations in PySide6.
  2. Modifying the setWeight method in feedsandspeeds.py to use the QFont.Weight enumeration in PySide6.
  3. Adjusting the load_ui and qpixmap_from_svg methods in util.py to handle the different ways of working with directories and buffers in PySide6.

These changes ensure that the application remains functional and up-to-date with the latest PySide API, while still maintaining backward compatibility with PySide5.

knipknap commented 5 months ago

Looks great, Thanks for the patch!

Arm4g3ddon commented 5 months ago

Thanks! I haven't checked everything. Just creating new tools and editing tools. Also might have fixed one Issue where feedsandspeeds didn't show on Windows.