woboq / qmetaobject-rs

Integrate Qml and Rust by building the QMetaObject at compile time.
MIT License
648 stars 89 forks source link

Feature "qtwidgets" added. #294

Open Atlas42 opened 1 year ago

Atlas42 commented 1 year ago

Link with QtWidgets and use QApplication when activated (default) Use QGuiApplication when not.

Replaces #288

I rewrote the patch in a new clean branch, keeping the master for my own projects dependency.

As #[cfg] and cpp! does not work well (if not at all together), I used a C++ predefined symbol to configure the used class. Not as clean as I would like but I lost too much time already to figure out somthing that works. Tell me if you have a better solution.

ogoffart commented 1 year ago

This is a breaking change so it will require a major version update.

Atlas42 commented 1 year ago

major as in 1.0.0 or as 0.3.0 ? any idea when that will happen ? not a big fan of keeping custom versions for a long time.

Any idea on implementing this without making it a breaking change ? I thought about using a "no-qwidgets" feature instead but I find this rather dirty.

ogoffart commented 1 year ago

0.3

Could happen soon.
@ratijas is there any other change you would like to do?

ratijas commented 1 year ago

nah, it's not like I'm actively working with anything in Rust lately. But thanks for asking!

Maybe we could consider finilizing and merging #227 as well?

ratijas commented 1 year ago

Since this PR seems to be replacing #211, how about adding a little note to README just like they did?

ratijas commented 1 year ago

is there any other change you would like to do?

Also, this

Or we can just keep this QObjectBox as deprecated and remove it when we have reason to break semver.

https://github.com/woboq/qmetaobject-rs/pull/178

Atlas42 commented 1 year ago

README entry added, my PR is almost identical to #211