Future of vsgQt, looking for community feedback #744
Replies: 4 comments 12 replies
-
Hi All, I will tell you my solution to the Qt backward compatibility problem, based on the experience of compiling vsgQt on Qt6.
When automatically determining the Qt version, we can simply set the CMAKE_PREFIX_PATH variable to select the Qt version, otherwise CMake will search for qt in the system directories and it is not known which version will be selected, therefore it is always recommended to specify exactly the path to the Qt installation, and not the package name. Qt 5.15 also introduced versionless CMake targets. If we raise the minimum version of Qt to 5.15, it will make the task easier, but there may be difficulties with older versions of Linux distributions. The decision is up to the community! |
Beta Was this translation helpful? Give feedback.
-
There may be a limited demand for vsgQt. The Qt Company has shifted towards licensing new code additions under the GPL3+ license instead of the LGPL. This change require's individuals who do not wish to license their projects under the GPL to purchase a subscription. This approach is similar to the one taken by Oracle with Java and was a contributing factor in the development of Kotlin by Google. It's also why we don't see very many KDE/Qt forward Linux distributions anymore. Everyone is moving to permissive licenses. Many people are interested in Wayland and KMS/DRM support, and luckily, projects such as SDL, GLFW, and SFML https://github.com/SFML/SFML have covered this aspect well. If you're curious, I actually wrote an example 11 years ago demonstrating how easy it is to integrate SFML and OSG3. You can find it here: https://gist.github.com/zester/2402691. Why not just provide a working Qt5/Qt6 example. option(ENABLE_QT5 "Enable Qt5 support" ON)
option(ENABLE_QT6 "Enable Qt6 support" OFF)
if(ENABLE_QT5)
find_package(Qt5 COMPONENTS Widgets REQUIRED)
add_definitions(-DUSE_QT5)
endif()
if(ENABLE_QT6)
find_package(Qt6 COMPONENTS Widgets REQUIRED)
add_definitions(-DUSE_QT6)
endif()
if(ENABLE_QT5)
target_link_libraries(MyProject PRIVATE Qt5::Widgets)
endif()
if(ENABLE_QT6)
target_link_libraries(MyProject PRIVATE Qt6::Widgets)
endif() |
Beta Was this translation helpful? Give feedback.
-
Hi, For any non-standard version (previously from a download or a self-built) I just Works like a charm for many years now. In general I would be interested in a replacement for Qt when it comes to creating menus, widgets, layouts which are good looking, because of the changes in licensing. Cheers, have a great day |
Beta Was this translation helpful? Give feedback.
-
While vsgQT works on Linux and Windows I see no possibility to build it on the Mac. There is no QtVulkan in the installed binaries, it cannot be configured from the qt sources as well. Is there any Mac expert with better experience? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
This week I've been reviewing a couple of submissions from @asafran, that addressed Qt6 warnings and Wayland support. These PR's prompted me to do some refactoring to address the issues that these PRs raised and do some refactoring to simplify and make vsgQt a little more flexible.
The Qt6 warnings are now addressed and merged with vsgQt master. The Wayland support I've tackled as part of a wider refactor and simplification that needs testing across platforms as I'm only able to test with Kubuntu right now, so I'd appreciate testing under Linux with Wayland, Windows and macOS before I merge with vsgQt master. The changes are checked into branch:
https://github.com/vsg-dev/vsgQt/tree/RefactorInstanceExtensionSurfaceName
In theory these changes should also open the door to supporting Android and iOS, and perhaps longer term QNX and other combinations. To simplify the code I've removed the old code for enabling use of native vsg::Surface implementations, doing this means we rely entirely on Qt to create the vkSurface, unfortunately this also means Qt has to have Vulkan support, so now Qt 5.10 is now the minimum supported version.
One of the changes I haven't carried over from Andrei's changes were to vsgQt/CMakeLists.txt implemented Qt detection, the changes are:
I haven't merged this as I would rather users explicitly select which Qt version to use and it's not clear to me how this might be achieved with the above changes. However, it does raise a wider issue, how should users select which Qt version they wish to build vsgQt for, and what happens when users want to have both Qt5 and Qt6 versions of vsgQt on their system for different projects. If 3rd party package maintainers want to distribute binaries for vsgQt they will also face this issue.
How might be navigate this? Have a vsgQt5 and vsgQt6 libraries built side by side? Do something crazy like make vsgQt a header only so there's no lib at all, and have the Qt version determined at compile time by the application using it?
Longer term I'd like to refactor vsgQt to handling multiple windows with them sharing a single Viewer rather than the ViewerWindow cludge that we currently have. I don't know how best to do this as Qt has control over the when the windows get redrawn which is different to how the VSG native windowing and viewer are designed to be used where the viewer tells the windows to redraw on each new frame.
I'm open to suggestions as I'm no Qt expert, I'm just learning Qt which trying to figure out how to make vsgQt work satisfactorily.
Right now I'd also appreciate testing of the RefactorInstanceExtensionSurfaceName branch of vsgQt. If things look to be working correctly under Windows, macOS and Linux+Wayland I'll go ahead and merge with VSG master.
Beta Was this translation helpful? Give feedback.
All reactions