To further add to the documentational mud

https://doc.qt.io/archives/qt-4.8/qlayout.html#addWidget

void QLayout::addWidget(QWidget * w)

Adds widget w to this layout in a manner specific to the layout. This function uses addItem().


Putting it in human terms:

You are the parent of your child. When your child takes a job a part-time job at say, a gas station (feel free to insert whatever for the place of employment) they will have a manager at that place of employment. That manager may have many other layers of management but your child reports to their manager and you are still their parent.

Bringing it back to Qt.

A widget can have only one layout manager at a time, yet it can have many other managers. Your widget could have, say, an alarm manager. It and many other widgets on many other screens in other layouts could have also been added to an alarm manager. When some alarm condition happens the alarm manager tells the list of widgets it managers to change to a flashing border or a color indicating the alarm level.

On 2/23/19 4:00 AM, interest-requ...@qt-project.org wrote:
The docs are indeed unclear, but look at what you're quoting -- a
function to add QLayoutItems to a layout. A QWidget is NOT a QLayoutItem
(but it is possibly managed by one). QLayout::addItem will add a
QLayoutItem to a layout, passing ownership of the_item_  to the layout
(but not of the widget the layout item is managing).

--
Roland Hughes, President
Logikal Solutions
(630)-205-1593  (cell)
http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net
http://www.johnsmith-book.com

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to