Results 1 to 3 of 3

Thread: QFrame subclass does not reparent

  1. #1
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default QFrame subclass does not reparent

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFrame subclass does not reparent

    What does QDesignerCustomWidgetInterface::isContainer() return for your plugin?

  3. The following user says thank you to jacek for this useful post:

    high_flyer (21st March 2006)

  4. #3
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QFrame subclass does not reparent

    Ah... that was it!
    I forgot all about the wrapper...
    Thanks!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.