Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to create designer custom widget with single QAction property?



  • 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)
       ...
    }
    
    


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



  • @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.


Log in to reply