Solved QtGraphicalEffects types not showing up in designer QML types library panel
-
I just implemented some QtGrapicalEffects in my app, like a FastBlur, Blend, etc. I wrote these in QML using a text editor, and they work great and even are rendered properly in the designer canvas. However, the QML Types included in QtGraphicalEffects do not appear in the QML Types Library, and so cannot be dragged into the canvas. Is this the intended functionality? Are these effects only available by using the text editor to define them? Is there another way to create a QML type and add it to your scene without resorting to the text editor? My concern is for ease of use of a UI/UX designer being able to work solely within the form editor, such a user should rarely if ever having to fall back to editing QML code directly.
I'm using Qt 5.9 and Qt Creator 4.3.0.
Thanks!
-
Hi and welcome the the Qt Forum,
You are right, there are much more QML types under the hood than the one you see in the QML designer environment.
Not all of them make it into a QML designer plugin, and those you have to manipulate like you did.I'm curious to see what you have made with the Graphical effects. Could you show us an image or something?
-
Hi Eddy, Thank you for clarifying this point. I figured this would be the answer, but it is good to know for certain.
I've been working on a Qt <-> openFrameworks integration shim using QQuickPaintedItem backed by an FBO render target. I'm using this test app as a way to both familiarize myself with Qt and QML in general, as well as to debug the Qt openFrameworks shim layer and make sure it plays nicely with standard QML types.
In order to avoid having to load openFrameworks into the designer, the plugin dll loads mock versions of each custom widget which simply displays an image, but when you run it you get the real implementation.
On the left, a simple test widget loading a and displaying an image using openFrameworks, as well as drawing a circle.
On the right, a simple 3d viewport example which can be controlled with WASD keys like an FPS game.
The buttons change the color of both the circle on the left and the background on the right, using Q_PROPERTY definitions in each custom widget, and QML connections to wire it up. -
Cool!
Thanks for sharingEddy
-
Sounds good ! Thanks !