Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Promoted custum QWidget preview in the UI Editor

Promoted custum QWidget preview in the UI Editor

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 282 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CP71C Offline
    CP71C Offline
    CP71
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bonnie
      wrote on last edited by Bonnie
      #2

      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...

      CP71C 1 Reply Last reply
      5
      • B Bonnie

        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...

        CP71C Offline
        CP71C Offline
        CP71
        wrote on last edited by
        #3

        @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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved