QLayout: Attempting to add QLayout "" to browser"", which already has a layout
General and Desktop
3
Posts
3
Posters
2.9k
Views
1
Watching
-
Hello
I'm a bit confused with the Widget/Layout relationship. I have a widget (A) that has a QHBoxLayout. To this I want to add a custom widget (B) that has a gridlayout of its own. And finally add some custom widget (C) to this grid. How should this be done correctly?I add B->A with addwidget (on the layout). In Bs constructor (the custom one) I've called QWidget(parent) to init the superclass. I've also added a layout whose parent I've set to "this".
Finally I've added the custom widgets to this grid. But I get a bunch of:
@QLayout: Attempting to add QLayout "" to XXX"", which already has a layout@
I guess there's epic fail in this principle, but can't figure out what. Could someone please help.
- R