PDA

View Full Version : Who is my layout?



davisjamesf
16th November 2007, 20:34
If I were a button, how might I found out what layout I reside in?

I'm trying to get the layout I reside in through a ButtonGroup connection. I will loop through the layout's children and find another widget in my same layout. I know how to loop through a layout, just not how to find out which one the button is in.

James

jpn
16th November 2007, 21:06
That would be
parentWidget()->layout() but I highly recommend looking for another possibilities to communicate between those two widgets. How about using for example signals and slots? ;)