How do I put a QLayout in a QWindow?
-
I am trying to put a QLayout in a QWindow.
But doesn't it come out, is it possible ???
How to set (buttons, text, 2D chart elements) in a QWindow ??I found this text https://doc.qt.io/qt-5/qwindow.html but still did not understand how to insert two-d graphic elements there (buttons, labels, check marks)
-
@timob256
Cross-referenced from your other thread at https://forum.qt.io/topic/132655/how-to-embed-ogre3d-in-qt5-as-a-widget.A
QWindow
is not derived from aQWidget
, so, no, you cannot put aQLayout
on it. Docs say:The QWindow class represents a window in the underlying windowing system.
So you do not set extra buttons or charts or whatever on a
QWindow
.You may know better than I, and I don't know how it relates to your "Ogre" situation, but you may want to read through What is the difference between a QWindow and QWidget and maybe Introducing QWidget::createWindowContainer() too. Qt: layouts with a Qwidget window container talks about layouts too.