PDA

View Full Version : QFrame subclass does not reparent



high_flyer
21st March 2006, 23:06
Hi,

I made a subclass of QFrame and made it available as designer plugin.
The reason I subclassed it was to enhance the looks of the frame and to offer more properties to do that, so basically nothing in the functionality of the original QFrame was changed, only the way it draws it self.
The plugin works fine as far as designing its looks, but it wont accept children droped in it.
A normal QFrame will reparent a windget that is droped on it, but my subclass wont.
If I drop a winget on it and then move the frame the frame will move and the dropped widget will stay in place on the form.
Also, in the object inspector in designer one can see my frame will not reparent the dropped widget by the fact that both stay at the same tree level.
But since I changed nothing in the original QFrame I can't understand why is this so.

Can anyone offer a reason to this, and what I should do make it accept children like the original QFrame does?

Thanks.

jacek
21st March 2006, 23:12
What does QDesignerCustomWidgetInterface::isContainer() return for your plugin?

high_flyer
21st March 2006, 23:15
Ah... that was it!
I forgot all about the wrapper...:rolleyes:
Thanks!