Results 1 to 2 of 2

Thread: Custom Container widget plugin help needed

  1. #1
    Join Date
    May 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Custom Container widget plugin help needed

    I have a custom container class. Basically its a Qframe within a QFrame. The first Qframe has three child widgets. The left side of the widget is a handle that supports click and drag. The bottom is a widget that contains min, max and close buttons. These have css custom graphics. So now we get to the problem, the rest of the widget is another QFrame that we want the child widgets to go into.

    I think the problem is that with the current Qwidget plugin example setup designer puts child widgets in the outer QFrame not the internal one. One problem with this that it already contains a layout hence none of the valid Designer layout toolbar options are available ( set, break, ..). My question would be how would i be able to have designer only access the internal QFrame and the outer is just for show.

  2. #2
    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: Custom Container widget plugin help needed

    I guess it is possible to solve programatically, but I think it would be much simpler if the you would implement the outer frame as border-image with styleshetts, reducing the complexity of the widget dramatically.
    Is that an option for you?

    If not, you might want to have a look at QObject::childEvent () and maybe override it for the outer QFrame.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 1
    Last Post: 6th May 2010, 10:09
  2. Custom Widget Plugin
    By alisami in forum Qt Programming
    Replies: 2
    Last Post: 16th March 2009, 14:33
  3. Custom widget plugin problem
    By vieraci in forum Qt Tools
    Replies: 1
    Last Post: 27th October 2007, 13:26
  4. Problem with custom container widget
    By MrGarbage in forum Qt Tools
    Replies: 4
    Last Post: 25th August 2007, 03:37
  5. Replies: 4
    Last Post: 9th August 2007, 08:20

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.