Fixups with Qt6 enums (#13611)

* Python PySide enums to C++ converter

* Python IntFlags to C++ int in getStandardButtons

* Remove int conversion in mods Python sources
This commit is contained in:
Martin Rodriguez Reboredo
2024-05-06 13:02:18 -03:00
committed by GitHub
parent b00a4384bf
commit 51987dc1ab
27 changed files with 64 additions and 52 deletions

View File

@@ -734,8 +734,9 @@ QDialogButtonBox::StandardButtons TaskDialogPython::getStandardButtons() const
if (dlg.hasAttr(std::string("getStandardButtons"))) {
Py::Callable method(dlg.getAttr(std::string("getStandardButtons")));
Py::Tuple args;
Py::Int ret(method.apply(args));
int value = (int)ret;
Gui::PythonWrapper wrap;
wrap.loadWidgetsModule();
int value = wrap.toEnum(method.apply(args));
return {value};
}
}