How to add a Custom Layout to Qt Designer.



  • i have created a custom Layout now my requirement is to add this layout to the Qt Designer, Is there any possible way to add a custom layout to the Qt designer. I have checked "this thread":http://qt-project.org/forums/viewthread/6322 but was not able to open the bug report for the particular link.

    Thanks.



  • Create a stackedWidget, add another ordinary widget inside the stackedWidget,
    und define that second widget later as a placeholder (right mouse button on that widget).
    A placeholder namely pointing to your costum widget.
    As soon as you activate the empty placeholder-widget, the custom widget appears on top of the placeholder.
    Can be done with the creator. No codig required.
    Needs the custom widget (class) to be available in advance, because the placeholder-assigner will need that class readily in advance.
    That worked in my application.
    Once you did it once, it is a simple snap.

    Add'l info:
    May be you do not have the need for a stackedWidget (containing the placeholder widget),
    and you may use a simple Widget directly, serving as a placeholder for your custom widget.
    I did not try this simpler version.

    Renark:
    be sure your both artificial widgets are larger than your custom widget.
    The custom widget will be placed inside the placeholder widget,
    and if one of these artificial widgets is too small, it truncates your custom widget.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.