Versions tested
- Windows 10 (17134.345)
- Qt 5.11.2
- cmake 3.12.2
- rust 1.30.0
- VS 2017 x64 native devtools (eg Windows SDK and MSVC)
- git clone repository locally. For the example C:\src\rust-qt-binding-generator
cargo build --release
- Add the binary folder to the $PATH variable
- open the todos example folder and open
CMakeLists.txt
- Change librust.a to rust.lib in line 40
- Add WS2_32.LIB Userenv.lib in line 64
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH=C:\Qt\5.11.2\msvc2017_64\lib\cmake
- Open a VS prompt (eg "Develop Command Prompt for VS2017")
- Build the cmake generated solution
msbuild /p:Configuration=Release ALL_BUILD.vcxproj
- This is the only command which requires the dev prompt. Rest should work in normal cmd.exe.
- Build the cmake generated solution
- Add the required Qt libs. Open
C:\Qt\5.11.2\msvc2017_64\bin
and executewindeployqt.exe C:\src\rust-qt-binding-generator\examples\todos\Release\todos.exe --qmldir C:\src\rust-qt-binding-generator\examples\todos
- Start
todos.exe
! You might want to set the following variables so the app looks as intendedset QT_QUICK_CONTROLS_MATERIAL_THEME=Dark
set QT_QUICK_CONTROLS_STYLE=Material
If the app crashes on startup, your OpenGL driver might be misbehaving. Set these variables to workaround
set QT_OPENGL=software
set QT_ANGLE_PLATFORM=