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. Changing properties of custom widget from designer
Forum Updated to NodeBB v4.3 + New Features

Changing properties of custom widget from designer

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 851 Views 2 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.
  • apalomerA Offline
    apalomerA Offline
    apalomer
    wrote on last edited by
    #1

    Hi,

    I have a custom widget for which I have an interface so I can add it in the designer and see how it looks (not promoting widgets, drag and drop from side menu). For this, I used QDesignerCustomWidgetInterface. Now, I want to be able to modify some of the properties of my widget from the designer itself. However, I can modify options regarding the base class QWidget. By this I mean, that at this time I only get the yellow options of the following image (specific for QWidget), but I don't get any other option such as the green or blue ones (specific options for QAbstractButton and QPushButton respectively). If I want to be able to add options to the designer which module from the QtDesigner Modules should I use and how?

    Thank you very much!

    0_1502615236401_Screenshot from 2017-08-13 02:05:58.png

    1 Reply Last reply
    0
    • apalomerA Offline
      apalomerA Offline
      apalomer
      wrote on last edited by
      #3

      I have not event looked at http://doc.qt.io/qt-5/qdesignerpropertysheetextension.html#details, just adding Q_PROPPERY() macro the elements were added directly.

      1 Reply Last reply
      1
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by mrjj
        #2

        Hi
        I think this is what you are after
        http://doc.qt.io/qt-5/qdesignerpropertysheetextension.html#details

        It shows samples.

        Also did you declare any of your own data with Q_PROPERTY() ?
        It should show up in the DEFAULT Property Sheet.
        Help mention it, but i forget where.

        1 Reply Last reply
        1
        • apalomerA Offline
          apalomerA Offline
          apalomer
          wrote on last edited by
          #3

          I have not event looked at http://doc.qt.io/qt-5/qdesignerpropertysheetextension.html#details, just adding Q_PROPPERY() macro the elements were added directly.

          1 Reply Last reply
          1

          • Login

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