[Qt-interest] remove QSplitter children / disable splitterdragging.

Ben Swerts benswerts at telenet.be
Mon Oct 26 21:48:10 CET 2009


> Thanks Brad,
> 
> 2009/10/22 Brad Howes <howes at ll.mit.edu>:
> > Here's what I did, though it may be overkill for Qt4. I have a class
> > called Splittable that is derived from QStackedWidget (!). In the
> > Splittable interface, there is a split() slot that will split a view
> > in two -- I support infinite levels of splitting, each new view can
> > subsequently be split in two. The split() method takes a
> > Qt::Orientation value, the new QWidget object to show in the split
> > view. There is also a slot called unsplitWith() with takes the object
> > to keep after the unsplit.
> >
> 
> I guess I haven't missed anything then - this isn't supported at all.
> Does this seem a little odd to anyone else? After all, the QSplitter
> API allows you add *add* widgets, why not remove them?

I didn't follow this thread from the beginning but you can just delete the
required widget in the splitter, i.e. 'widget->deleteLater()' or similar.

Hope it helps.

Greets,


	Ben




More information about the Qt-interest-old mailing list