KDAB / cxx-qt

Safe interop between Rust and Qt
https://kdab.github.io/cxx-qt/book/
964 stars 66 forks source link

Add QtQuickControls module to cxx-qt-lib, expose QQuickStyle #966

Closed redstrate closed 3 weeks ago

redstrate commented 1 month ago

This is used to control which Quick Controls style is used in the application. This is part of the Quick Controls API and requires the QuickControls2 Qt module, so it's separated into another folder in cxx-qt-lib.

Example:

QQuickStyle::setStyle(&QString::from("Basic"));
QQuickStyle::setFallbackStyle(&QString::from("Material"));
println!("Style name: {}", QQuickStyle::name());

This is a pretty common pattern in KDE applications, and a pretty low-hanging fruit.

ahayzen-kdab commented 1 month ago

@redstrate Looks great, CI is failing on Windows with a linker issue. Looks maybe related to the tests though, could you try adding a test to qt-types-standalone and in the CMake ensure it links to QuickControls maybe that'll help ?

LeonMatthesKDAB commented 1 month ago

@redstrate I've rebased the branch so CI should pass again now :crossed_fingers:

redstrate commented 4 weeks ago

@redstrate Looks great, CI is failing on Windows with a linker issue. Looks maybe related to the tests though, could you try adding a test to qt-types-standalone and in the CMake ensure it links to QuickControls maybe that'll help ?

Most of the CI works now, except for Windows. I'm guessing the QtQuickControls dll is missing from the bin folder, is there something I need to manually change to make that work?

LeonMatthesKDAB commented 3 weeks ago

@redstrate I think these failures are unrelated to your changes. the nightly builds also have started to fail in the last days, without any code changes.

I can also observe similar failures on https://github.com/kdab/knut and https://github.com/kdab/kdbindings.

Also, I bet if we build our CI in debug mode it's suddenly going to work again...