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. QtDesigner container plugin with custom page class
QtWS25 Last Chance

QtDesigner container plugin with custom page class

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.9k Views
  • 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.
  • R Offline
    R Offline
    RainWhisper
    wrote on last edited by
    #1

    Hi, everyone! I develop a custom multi-page widget. I want to be able to manage a page list in QtDesigner. As I know, the best is to use QDesignerContainerExtension class to archive this goal. But I need that pages be custom classes, not a QWidget. How can I archive this? Thank in advance!

    1 Reply Last reply
    0
    • O Offline
      O Offline
      ogoffart
      wrote on last edited by
      #2

      In your impementation of QDesignerContainerExtension::insertWidget, you can create your own custom widget instead of using directly the one passed as parametter (maybe you can just ignore it or you need to call deleteLater on it)

      redtideR 1 Reply Last reply
      0
      • R Offline
        R Offline
        RainWhisper
        wrote on last edited by
        #3

        Thank you for this suggestion! Will I see the actual type of a page widget in the object tree and the property editor? It would be perfect :)
        [quote author="Olivier Goffart" date="1324648773"]In your impementation of QDesignerContainerExtension::insertWidget, you can create your own custom widget instead of using directly the one passed as parametter (maybe you can just ignore it or you need to call deleteLater on it)[/quote]

        1 Reply Last reply
        0
        • O ogoffart

          In your impementation of QDesignerContainerExtension::insertWidget, you can create your own custom widget instead of using directly the one passed as parametter (maybe you can just ignore it or you need to call deleteLater on it)

          redtideR Offline
          redtideR Offline
          redtide
          wrote on last edited by redtide
          #4

          @ogoffart In your impementation of QDesignerContainerExtension::insertWidget, you can create your own custom widget instead of using directly the one passed as parametter (maybe you can just ignore it or you need to call deleteLater on it)

          I tried this and I'm pretty sure you can't do it in Qt 5.15 at least, you end up with a Qt Designer warning dialog saying that that's an unmanaged widget and you should use the domXml() instead (Heaven knows how); at some point later it makes crash the designer when adding a child to the custom widget page.

          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