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 - custom plugin - QWidget not behaving properly - cant add children/layouts.

QtDesigner - custom plugin - QWidget not behaving properly - cant add children/layouts.

Scheduled Pinned Locked Moved Solved General and Desktop
qtdesignerpluginwidgetqwidget
4 Posts 2 Posters 452 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.
  • D Offline
    D Offline
    Dariusz
    wrote on 8 Apr 2023, 11:25 last edited by
    #1

    Hey

    I want to extend QWidget, give it some more properties and use it as my base building block.

    Sadly when I drag it on the widget form, it seems to be "dull". I can't set layout on it nor add other widgets to it.

    As far as I can tell I need https://doc.qt.io/qt-6/qdesignercontainerextension.html but this is for multi page widget, not QWidget from what I can read... any idea what class I need to extend?

    Regards
    Dariusz

    M 1 Reply Last reply 8 Apr 2023, 12:25
    0
    • D Dariusz
      8 Apr 2023, 11:25

      Hey

      I want to extend QWidget, give it some more properties and use it as my base building block.

      Sadly when I drag it on the widget form, it seems to be "dull". I can't set layout on it nor add other widgets to it.

      As far as I can tell I need https://doc.qt.io/qt-6/qdesignercontainerextension.html but this is for multi page widget, not QWidget from what I can read... any idea what class I need to extend?

      Regards
      Dariusz

      M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 8 Apr 2023, 12:25 last edited by
      #2

      @Dariusz

      Hi
      Do you have

      bool YourPlugin::isContainer() const
      {
      return true;
      }

      D 2 Replies Last reply 8 Apr 2023, 13:41
      2
      • D Dariusz has marked this topic as solved on 8 Apr 2023, 13:40
      • M mrjj
        8 Apr 2023, 12:25

        @Dariusz

        Hi
        Do you have

        bool YourPlugin::isContainer() const
        {
        return true;
        }

        D Offline
        D Offline
        Dariusz
        wrote on 8 Apr 2023, 13:41 last edited by
        #3

        @mrjj darn it, I missed it O.O
        Thanks!!! it works!

        1 Reply Last reply
        1
        • M mrjj
          8 Apr 2023, 12:25

          @Dariusz

          Hi
          Do you have

          bool YourPlugin::isContainer() const
          {
          return true;
          }

          D Offline
          D Offline
          Dariusz
          wrote on 6 May 2023, 08:34 last edited by
          #4

          Hey @mrjj
          Digging out this topic... as I figure better to stick it in the same tree...

          Anyway, any idea how to make QScrollArea behave correctly too? Making it container does not let me drag widgets on it :/

          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