If you want that kind of stuff, use QML instead of QWidgets
Yes, I should try that.
For the moment I prefer Widgets, maybe because I started programming 25 years ago. My mind tells me that QML comes with an incredible overhead. I always think like have do the work of my computers processor myself :-)