Skip to content

Static methods for Q_PROPERTY getters & setters #184

Open
@ratijas

Description

@ratijas

Not sure if it is a documented and supported feature of Q_PROPERTY / MOC, but apparently it supports static members (that would be associated methods in Rust) for READ & WRITE, i.e. property getters and setters.

Examples include QCoreApplication class and its application{Name,Version},organization{Name,Domain} properties which could be set from any context without obtaining an instance of the application first. Documentation handles this pretty bad though. There is no indication in "Property Documentation" section that "Access functions" are static; however they at listed separately in "Static Public Members" table.

I think that wouldn't too hard to implement in Rust. And I might use it for a driver singleton in my project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustArea: Rust glueC-feature-requestCategory: A feature request, i.e: not implemented / a PR.E-mediumCall for participation: Experience needed to fix: Medium / intermediateP-mediumMedium priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions