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. QDesignerCustomWidgetInterface name in palette
Forum Updated to NodeBB v4.3 + New Features

QDesignerCustomWidgetInterface name in palette

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 197 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.
  • Andy314A Offline
    Andy314A Offline
    Andy314
    wrote on last edited by Andy314
    #1

    Hello, have created my own widgets with the deriving from the
    QDesignerCustomWidgetInterface.

    The shown name of the widgettype in the palette of the Designer is build of the
    QDesignerCustomWidgetInterface.name()
    function. In the documentation you can read, it must give the same as the class name of the widget.

    So far so good, but I want a more human readable name for it in the palette, similar to the standard qt widgets ( QComboBox -> Combo Box).

    Is this possible ?

    I tried to change the name in the name() function and indeed an other name is shown, but all additional propierties of the widget in the editor will not be shown.

    Pl45m4P 1 Reply Last reply
    0
    • Andy314A Andy314

      Hello, have created my own widgets with the deriving from the
      QDesignerCustomWidgetInterface.

      The shown name of the widgettype in the palette of the Designer is build of the
      QDesignerCustomWidgetInterface.name()
      function. In the documentation you can read, it must give the same as the class name of the widget.

      So far so good, but I want a more human readable name for it in the palette, similar to the standard qt widgets ( QComboBox -> Combo Box).

      Is this possible ?

      I tried to change the name in the name() function and indeed an other name is shown, but all additional propierties of the widget in the editor will not be shown.

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @Andy314

      I don't quite understand what you are asking for.

      I mean, if you look at the Analog Clock example, it's done like this:

      QString AnalogClockPlugin::name() const
      {
          return u"AnalogClock"_s;
      }
      

      Can't you just put your desired name there (and name your class the same way)?


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      Andy314A 1 Reply Last reply
      0
      • Pl45m4P Pl45m4

        @Andy314

        I don't quite understand what you are asking for.

        I mean, if you look at the Analog Clock example, it's done like this:

        QString AnalogClockPlugin::name() const
        {
            return u"AnalogClock"_s;
        }
        

        Can't you just put your desired name there (and name your class the same way)?

        Andy314A Offline
        Andy314A Offline
        Andy314
        wrote on last edited by Andy314
        #3

        @Pl45m4 said in QDesignerCustomWidgetInterface name in palette:

        @Andy314

        I don't quite understand what you are asking for.

        I mean, if you look at the Analog Clock example, it's done like this:

        QString AnalogClockPlugin::name() const
        {
            return u"AnalogClock"_s;
        }
        

        Can't you just put your desired name there (and name your class the same way)?

        Its more for esthetic than functionality:

        My Class ist "AdvancedComboBox" but I will see in the Designer palette somthing like " Combo Box (advanced).

        Similar to to the standard widgets:
        For class QComboBox I see in the designer the text "Combo Box".

        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