[Interest] Utilizing the GPU, how to start?

André Somers andre at familiesomers.nl
Wed Jul 6 08:34:44 CEST 2016

Op 06/07/2016 om 02:56 schreef Scott Aron Bloom:
> -----Original Message-----
> From: Interest [mailto:interest-bounces+scott=towel42.com at qt-project.org] On Behalf Of Thiago Macieira
> Sent: Tuesday, July 5, 2016 5:42 PM
> To: interest at qt-project.org
> Subject: Re: [Interest] Utilizing the GPU, how to start?
> On terça-feira, 5 de julho de 2016 11:45:41 PDT Jason Kretzer wrote:
>> How does one get Qt widgets to take advantage of a GPU?  If this
>> question seem naïve, it is because it is.
>> With my application, I am displaying different types of media —
>> mp4 (using QMedia Player)
>> Html (folders containing a "mini-site” using QWebView) Images (using a
>> Qlabel)
>> This Qt 5.5, Windows7/10, running on a low end compute stick.  The CPU
>> seems to take the brunt of the performance.  Just wondering how to
>> offload some of that?
> Stop using QtWidgets, including QtWebView and QLabel, and transition to Qt Quick instead. Qt Quick uses the GPU, QtWidgets do not.
> ==========
> That’s a pretty horrible answer... There are MANY of us, who prefer for all sorts of reasons, to use C++ as our primary development language.
> Is there no outlook for QtWidgets to start using the GPU?
No, there is not. Not realisticly. First of all, widgets are "done", so 
not much development is going on there. But more important is that the 
way widgets are rendered simply doesn't suit the way modern GPU's work. 
It is the main reason Quick (2) was created in the first place: render 
the contents in such a way that it can utilize the GPU the way its meant 
to be used. That can't be retrofitted to the widgets world.

Note that even if you define your GUI in QML, you can still do 
everything else in C++. The QML doesn't have to be much more than what 
you already have as .ui files now, and they are not C++ either are they? 
Difference is of course that they get compiled into C++, where QML is not.


More information about the Interest mailing list