Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Promoted custum QWidget preview in the UI Editor



  • Hi everybody,
    I have a curiosity:
    Is it possible to see preview of a promoted custom Qwidget?

    I think no, but maybe there is a way that I don’t know.
    Example: seeing in the first image the layout of the second image. WidgetFormTop is promoted to FormTop.

    008f8500-8e36-4925-8d20-05336d5607a9-image.png
    Image 1

    8ded1687-b4d1-4ded-a640-6999f3b358d0-image.png
    Image 2

    Thank in advance
    CP71



  • In general, no.
    A "promoted" widget can only be previewed as the base widget it is promoted from.
    To "see preview of a custom widget", you'll need to write your own qt designer plugin.
    https://doc.qt.io/qt-5/designer-creating-custom-widgets.html
    That's quite not convenient and extra work.
    I think you wouldn't want to do it...



  • @Bonnie
    Thanks very much.
    I don't know this way, you are right, it is not convenient… but could be interesting in some occasion.

    Thanks
    CP71


Log in to reply