title: Getting Parent Layout in Qt
body: <p>quick question. Is there any way to (easily) retrieve the parent layout of a widget in Qt?</p>
  
  <p>PS: QObject::parent() won't work, for logical reasons.</p>
  
  <p>EDIT:
  I'm positive the widget has a parent layout, because I added it to a layout earlier in the code. Now, I have many other layouts in the window and while it is possible for me to keep track of them, I just want to know if there is an easy and clean way to get the parent layout.</p>
  
  <p>EDIT2:
  Sorry, "easy and clean" was probably not the best way of putting. I meant using the Qt API.</p>
  
  <p>EDIT3:
  I'm adding the widget to the layout like this:</p>
  
  <p>QHBoxLayout* layout = new QHBoxLayout;</p>
  
  <p>layout->addWidget(button);</p>