[Development] Add widgets into qt3d window

Sean Harmer sean.harmer at kdab.com
Thu Feb 25 20:01:21 CET 2016


Hi,

On 25/02/2016 18:02, Pierre wrote:
> Sean Harmer <sean.harmer <at> kdab.com> writes:
>
>> On Monday 30 Mar 2015 17:38:37 Arjun Das wrote:
>>> Hi ,
>>>
>>> I have created a simple qt3d application in c++, which has a rotating
> cube.
>>> I would like to add buttons to the windows to stop/start rotating the
> cube.
>>> I am not able to see such an example anywhere in the qt3d examples
> which
>>> has support for widgets.
>>>
>>> Could anyone please help me?
>> QWidget::createWindowContainer() if you wish to embed the window in a
> widget
>> hierarchy.
>>
>> Alternatively, use a Scene3D element if you wish to use a Qt3D scene
> within a
>> Qt Quick 2 scene (i.e. to overlay Qt Quick 2 controls over the 3D scene).
>>
>> More integration points will come later.
>>
>> Cheers,
>>
>> Sean
>>
> It won't work Sean. In 5.6 QWidget::createWindowContainer() has been
> deprecated. Since many of us use c++ with Qt3d with widgets we seem to be
> out of luck here unless something changes.

That doesn't mean you can't use it. It will have to exist until at least 
the end of the Qt 5.x series for source compatibility. We do not yet 
have any widget/Qt3D integrations.

Cheers,

Sean


-- 
Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
KDAB (UK) Ltd, a KDAB Group company
Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
Mobile: +44 (0)7545 140604
KDAB - Qt Experts




More information about the Development mailing list