Re: Parent-child-problems ;)
Quote:
Originally Posted by nupul
What do you think could be the problem?
When you show the parent, all of its children are shown too. Either add those children after you show the widget or hide just them.
Re: Parent-child-problems ;)
Quote:
Originally Posted by jacek
When you show the parent, all of its children are shown too. Either add those children after you show the widget or hide just them.
for the first part you mean like this:
Code:
mod_parent->show();
c1=new c1(mod_parent);
c2=new......
.
.
.
return app.exec();
and when and where should i hide them?
Thanks
Nupul
Re: Parent-child-problems ;)
Quote:
Originally Posted by nupul
for the first part you mean like this:
Yes, it should be enough.
Quote:
Originally Posted by nupul
and when and where should i hide them?
Whenever and wherever you like, just after you invoke the show() method.
Re: Parent-child-problems ;)
well I did as told and now the above problem is no longer there but a new one has cropped :eek:!!!
The children c1,c2,c2 are all coming as transparent :confused: ??
They had the framelesswindowhint flag enabled, even after disabling it, the children are still coming frameless!
What could be going on??
Thanks
Nupul
Re: Parent-child-problems ;)
Quote:
Originally Posted by nupul
The children c1,c2,c2 are all coming as transparent
What do you mean by "transparent"? Are these c1, c2 and c3 ordinary widgets or windows?
Re: Parent-child-problems ;)
Quote:
Originally Posted by jacek
What do you mean by "transparent"? Are these c1, c2 and c3 ordinary widgets or windows?
Well c1,c2,c3 are all individual windows having the Qt::FramelessWindowHint flag enabled
Re: Parent-child-problems ;)
Quote:
Originally Posted by nupul
Well c1,c2,c3 are all individual windows having the Qt::FramelessWindowHint flag enabled
Did you set the Qt::Window flag? Without it those widgets won't be separate windows.
Re: Parent-child-problems ;)
Quote:
Originally Posted by jacek
Did you set the Qt::Window flag? Without it those widgets won't be separate windows.
I commented it out but otherwise I have the Qt::SubWindow flag enabled...but still i fail to understand, howcome the transparency?:confused:
Re: Parent-child-problems ;)
Quote:
Originally Posted by nupul
but still i fail to understand, howcome the transparency?
Probably because of Qt::SubWindow, which tells Qt that this widget is not a standalone window. What flags did you set?
Re: Parent-child-problems ;)
Quote:
Originally Posted by jacek
Probably because of Qt::SubWindow, which tells Qt that this widget is not a standalone window. What flags did you set?
Actuall none...as in after enabling the Qt::Window flag, i see the widgets in their own window. But after commenting out all the flags, I see the label/buttons etc of the children, but on the background of the parent!! :confused:
Nupul
Re: Parent-child-problems ;)
Quote:
Originally Posted by nupul
after enabling the Qt::Window flag, i see the widgets in their own window.
Is that what you want?
Quote:
Originally Posted by nupul
But after commenting out all the flags, I see the label/buttons etc of the children, but on the background of the parent!!
Because you have told Qt to place that widget on its parent --- just like a button or combo box.