[Interest] Embedding QWindow

Till Oliver Knoll till.oliver.knoll at gmail.com
Tue Aug 5 13:45:59 CEST 2014


Am 05.08.2014 um 12:09 schrieb "rap" <rap at dlc.fi>:

> 
>> From: Till Oliver Knoll
>> Sent: Tuesday, August 05, 2014 11:27 AM
> 
>> But if I am not mistaken under the hood a QWindow is also used as base for e.g. a QMainWindow.
>> ...
> 
> That don't seem to be the case, QMainWindow inherits from QWidget,

That's why I wrote "[uses] under the hood" and not "inherits from" ;)

Maybe my "used as base" wording was a bit misleading here: I meant that the QtGui library acts as a "base" (basis? Sorry, not a native English speaker here ;)) for both QWidget and QtQuick applications to interact with the underlying windowing system.

So whenever a QWidget figures out that it is a "top-level" widget it request a "native window" - by "using" a QWindow (in Qt 4.x and earlier that Window Manager interaction was probably all coded into the QWidget (support) classes directly).

And I also wrote that a QWindow fits better into the "QtQuick world", since there it is indeed a base class (now in the "inheritance" meaning ;)) for QQuickView etc. - for the QWidget world you need a "wrapper class:, said QWindowContainer.

Also refer to Laszo's reply :)

Cheers,
  Oliver


More information about the Interest mailing list