KDAB / cxx-qt

Safe interop between Rust and Qt
https://kdab.github.io/cxx-qt/book/
973 stars 67 forks source link

Add `qsizetype` to `cxx-qt` crate #882

Open ahayzen-kdab opened 4 months ago

ahayzen-kdab commented 4 months ago

This means that when wrapping APIs we don't need to cast the type in C++.

Then once conditional code is working correctly #765 this could mean that cxx-qt-lib can remove a load of C++ code where it's just casting between isize and qsizetype or int depending on Qt 5 or Qt 6.

Consider which of these types from <QtGlobal> could be useful, eg qint64 could remove a lot of static_cast in C++, probably remove the need for C++ trampolines so that there are direct CXX bindings and just have a into/from on the Rust side? (either in a Rust side wrapper or just accept Into in methods not sure what happens with returns though?)