0

I have a four-panel QGridLayout and want to reserve one of the panels for a miniature view of other widgets like 3D views. The specific widget which I want to show inside QGridLayout is to be specified dynamically.

However, when I pass a widget to QGridLayout via QGridLayout::addWidget, the widget disappears from where it was before. Obviously, this is a policy of QGridLayout.

Is there a workaround to avoid this? Can I tell QGridLayout to retain a copy of a specific widget I am adding? Is there a way to pass a copy or an image of the widget? I just don't have a clue at this point.

Thanks in advance!

Maxim Makhun
  • 2,197
  • 1
  • 22
  • 26
Anton Poznyakovskiy
  • 2,109
  • 1
  • 20
  • 38
  • 1
    Take a look at Kaleb Peterson answer in this question http://stackoverflow.com/questions/7042799/showing-the-same-qpushbutton-on-multiple-widgets – Ilya Kobelevskiy Jan 13 '14 at 18:27
  • Thanks a lot for the link, but I prefer the solution provided by blueskin himself. I wanted to avoid writing extra subclasses for that, but I see now that this is the only possible way. – Anton Poznyakovskiy Jan 14 '14 at 10:24

0 Answers0