Connect QAction to private slot in Design?

Viewed 63

So I have a QAction menu item I'd like to connect to this slot:

private slots:
    void Open();

(trying to avoid Connect boilerplate and stuff)

In the designer it never shows up, the only effective way I've found is as follows:

  • connect to whatever slot visible in Design
  • manually edit the .ui file to <slot>Open()</slot>

This works but I was wondering if I didn't miss something for it to popup directly in the signals and slots editor and avoid this manual operation ?

1 Answers

Qt (uic) has an auto connect feature. You will need to follow a pattern for the slots to be connected automatically, the pattern is: on_UIELEMENTNAME_SIGNALNAME(<SIGNALPARAMS>) Read more in the documentation here

Related