[Qt-interest] QGridLayout addWidget

Leonardo M. Ramé l.rame at griensu.com
Mon Sep 27 21:11:31 CEST 2010


Hi, I'm trying to replace the widget of a "cell" in a QGridLayout, 
but if I use the code below, I get a SigSegv:

myLayout->addWidget(m_widgets.value(0), row, col);

m_widgets is a QHash<int, QMyWidget>, where I have inserted one item
using insert(0, new QMyWidget()).

The layout is a 3x3 grid, so I want to replace the cell (row, col) with
a different widget.

How can I do this?.

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com




More information about the Qt-interest-old mailing list