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. How to create designer custom widget with single QAction property?
Qt 6.11 is out! See what's new in the release blog

How to create designer custom widget with single QAction property?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 298 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.
  • A.v.OA Offline
    A.v.OA Offline
    A.v.O
    wrote on last edited by
    #1

    Goal

    Creating a custom widget with a QAction as a property.
    This property must be able to be assigned using the action editor in the designer.

    So Far

    Declaring the property like this makes it not appear in the designer which I expected.

    class 
    {
       ...
       Q_PROPERTY(QAction* action READ getAction WRITE setAction)
       ...
    }
    
    
    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      The explanation is here but unless you are providing a widget library the result is not worth the effort

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      0
      • A.v.OA Offline
        A.v.OA Offline
        A.v.O
        wrote on last edited by
        #3

        @VRonin said in How to create designer custom widget with single QAction property?:

        The explanation is here but unless you are providing a widget library the result is not worth the effort

        Of course I created a plugin library for the Qt Designer.

        The problem is how to get the Action to appear in the Qt Designer property editor and attach a QAction from the Action Editor.

        Maybe this is not possible at all.

        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