Skip to content

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

@ahayzen-kdab

Description

@ahayzen-kdab

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions