slint
slint copied to clipboard
Issue enabling qt backend on Opensuse Tumbleweed
So, let me preface this with saying I'm new to everything here except Linux itself. I'm new to Opensuse (though I've used a number of other distros), new to slint, new(ish) to gui development, and new to rust.
I'm just wanting to try a few of the available gui toolkits in rust to make a simple gui app to learn rust, gui development, and whatever gui toolkit I decide on. Slint has so far been the most annoying to set up. I've spent a few minutes each tackling the first few issues and while I am now able to run the examples (yay!) I am continually getting the "Qt is not available" and "qmake is not found in path" messages upon running "cargo build" in the examples. I know qt is not strictly necessary, but I'd like to get it working.
I'm running KDE and have installed the "devel-qt5" and "devel-qt6" patterns on opensuse, so I think I should have the necessary packages. How do I enable the qt backend, allow cargo to see qmake, and do I even need the qt5 devel package, or is qt6 sufficient?
I've attempted the following thusfar:
- On my system, qmake-qt5 or qmake6 are the commands to run qmake. I've attempted to set an alias qmake="qmake-qt5" but to no avail. I've also attempted this with qmake6.
- I've also attempted all 3 solutions found here (setting various environment variables to the header location, e.g. /usr/include/qt5) to help cargo find qt: https://docs.rs/qttypes/0.2.8/qttypes/#finding-qt
Thanks for any assistance you can offer!
Hi! I think @Montel had a somewhat similar issue in #1200 . Odd though that the the workaround that helped there and that you also tried (setting QT_INCLUDE_PATH and QT_LIBRARY_PATH) didn't work for you.
A bit of a shot in the dark (that shouldn't be required), but could it be that something was cached erroneously so that when you set QT_INCLUDE_PATH and QT_LIBRARY_PATH the build didn't even try again? Can you try removing your target/ sub-directory and see if that helps (in combination with setting the two environment variables)?