MeVisLab / pythonqt

Dynamic Python binding for Qt Applications
https://mevislab.github.io/pythonqt/
GNU Lesser General Public License v2.1
251 stars 89 forks source link

Fix Qt 6.7.3 #236

Closed usiems closed 1 month ago

usiems commented 1 month ago

This fixes the problem introduced with Qt 6.7.3, that the wrapper for the "Qt" namespace suddenly got methods like QKeyCombination static_Qt_operator+(Qt::KeyboardModifiers modifiers, Qt::Key key); The problem is two-fold:

  1. No proper name-mangling was applied to these static methods ("operator+" should be replaced by "__add__").
  2. Static operators don't work in PythonQt anyway and shouldn't be generated (we also can't assign the operator to the first argument type, since that is only a enum type, which has no separate wrapper generated).

The trigger for these problems was that these static operators have been moved to the Qt namespace in version 6.7.3.