Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For overloads in cxx-qt-lib use impl AsRef #810

Open
ahayzen-kdab opened this issue Jan 17, 2024 · 0 comments · May be fixed by Montel/cxx-qt#99 or #901
Open

For overloads in cxx-qt-lib use impl AsRef #810

ahayzen-kdab opened this issue Jan 17, 2024 · 0 comments · May be fixed by Montel/cxx-qt#99 or #901
Labels
⬆️ feature New feature or request 🙋 good first issue Good for newcomers

Comments

@ahayzen-kdab
Copy link
Collaborator

Where we need to have an overload in cxx-qt-lib, eg QPainter::setPen can take QColor or QPen or an enum. Accept impl AsRef<QPen> then implement Into from QColor and the enum. Then this should allow Rust code to have any of the types.

There are a few places already where we could have had overloads for QPoint, QSize etc consider doing this in those places.

Note however this will mean we need an extra impl block that then calls the direct CXX binding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⬆️ feature New feature or request 🙋 good first issue Good for newcomers
Projects
None yet
1 participant