This is a summary of my experiences with trying to use QQuickWidget instead of
createWindowContainer() in the QML profiler. The basic API is pretty much the same. You just have to
apply https://codereview.qt-project.org/#change,78555 to reproduce this. One nice thing is that now
I don't have to hide the main view anymore to show a progressbar. With the window container the
layering was undefined, leading to various problems. Now I can safely apply
https://codereview.qt-project.org/#change,78556 and any progress bars will be shown on top of the
QML scene. Another effect is that I see much fewer artifacts when resizing the dock area (this is on
X11, see also https://bugreports.qt-project.org/browse/QTBUG-35805)
However, there are some pretty major flaws still.
- If I just try with current qtdeclarative it will crash as soon as I select the profiler because
apparently it doesn't create a renderer if given a size with height == 0, but later expects it to
be present. Checking for renderer before using it, as in https://codereview.qt-project.org/78553 ,
works around that.
- Generally I see a couple of error messages when creating the widgets:
- There are white dashed lines at the bottom right and lower left. See the screenshots.
- It produces artifacts when hidden and later shown again. In order to see this, I leave out
https://codereview.qt-project.org/#change,78556 and only try with
https://codereview.qt-project.org/#change,78555 . If I profile anything, when collecting the data
the main timeline view is supposed to be hidden and the progress bar is shown. When the collecting
is done the progress bar is hidden and the timeline is show again. See the screenshots for the
artifacts I get in that process. Part of that could be due to misuse, in particular the fact that
the toolbar moves to the center. However, note that after calling show(), the (unrelated) timebar
widget is invisible. When switching away from the QQuickWidgets and back, e.g. via the events view
everything looks normal again.
- The QQuickWidgets go completely black or white when detaching and reattaching them from/to the
dock as own window. See white.png for that effect. I get more error messages in that case:
Quite often it just crashes when trying to detach:
- Doubleclick doesn't work. Select a range in the main view with the range tool from the tool bar.
Doubleclicking on the selected range normally makes the view zoom into the selection. It doesn't
- Clicks on other widgets are sometimes lost. I don't know how to reproduce that, yet. However, on
one occasion the application became completely unresponsive because no mouse events were delivered
to anything anymore and on another occasion I could only access the main menu and had to click
twice everytime before the click was registered.