Custom QMainWindow slots. How do I access them in Qt Designer?

  • I have five slots in my header and code for my class inherited from QMainWindow. There doesn't seem to be an ability to import those slots into Qt Designer. I have compiled the code and tried using the Signal/Slot editor for the window but neither have allowed me to connect QAction triggered() signal with a specific slot in my code.

    Here they are:

    public slots:
    	void onAddPlatformClicked();
    	void onAddPluginClicked();
    	void onBrowseSource();
    	void onBrowseDestination();
    	void onGenerateClicked();

  • Never worked for me as well. I just use connect() in the constructor for custom slots and signals.

  • Good to know. Qt should fix this problem though. Qt has some great ideas about designing forms but this is a rather gaping hole since other designers make this easy to do.

  • @primem0ver TBH I find it much quicker (but that's just me) to do all signal/slot connections this way, written into constructor or other relevant place in the code instead of using designer.

Log in to reply