semlanik / qtprotobuf

Protobuf generator and bindings for Qt framework
https://semlanik.github.io/qtprotobuf
MIT License
169 stars 38 forks source link

Add google.protobuf.Duration converter to QTime #84

Open semlanik opened 4 years ago

unC0Rr commented 4 years ago

QTime is just a time part of QDateTime. It makes most sense to convert to std::duration instead.

semlanik commented 4 years ago

@unC0Rr the idea is to provide deeper integration with Qt, std::duration is not part of Qt metaobject system. Overall not sure how useful will be such convertors, but hope it will be easier to use QTime instead of google.protobuf.Duration in some cases.

unC0Rr commented 4 years ago

Yeah, I understand the idea, but Qt itself has no means to express durations, and probably the only place you can find them in Qt is timer periods, which accept std::duration.