How to change or detach layout of Widget?(+ or using private function)
first, i set the widget's layout,
but i want to change the layout of widget, according to condition.
they send the errormessage "~~already set the layout".
how can i solve this problem?
I find QWidget::takeLayout()
but it was private, so i can use this function :(..... plz give me the solution..
thanks to your replay :)!!!
i want to just change each layout....:(
i want to just detach the layout from widget, and reuse to another widget..
(if i use your solution, i can reuse layout1, 2... its correct?)
->(if i use your solution, i can't reuse layout1, 2... its correct?)
@Mue22 AFAIK to detach you will have to delete it and hence all the widgets inside it too. Then create new layout and then
i can reuse layout1, 2... its correct?
No, since it is deleted.
ah!! sorry sorry...i'm not freindly to english...:);;;;;
i want to say that:
if i use your solution, i can't reuse layout1, 2... its correct?
it's so difficult problem...:(
@Mue22 Yes you can't. Since detaching requires deleting, new layout must be created to use again.
Thanks to your kind replies!!!!
i think, maybe i find another method....