Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
Qt Creator 4.6.0
-
None
Description
Cannot generate corresponding slot function when configure custom slot function in slot/signal editor.
But it seems ok when configure with function inherited from a QtWidget.
Description
I found this issue on windows.
-
- Create a normal "Qt Widget Application"
- Expand the Forms folder in the project explorer, double click mainwindow.ui
- Drag a QPushButton to centralWidget of MainWindow
- Click "Edit Signals/Slot" button or press F4 entering signal and slot editing mode
- Drag a signal wire out from the QPushButton and drop it down on the MainWindow, connection configuration dialog popups
- Select "clicked()" item on the left side of the dialog window
- Click "Edit..." on the right side of the dialog window, Signal/Slot editor of MainWindow pops up
- Click "+" icon button on the top side of the dialog, type in the custom slot function name with parentheses like "MyButtonClick()", press "OK" to finish
- Return to connection configuration dialog window, click "MyButtonClick()" item on the right side of the window, click "OK"
Now, I'm supposed to see an empty MyButtonClick() function is defined in mainwindow.cpp, but I can find where the definition of the function is.
Error messages:
Debugging starts QObject::connect: No such slot MainWindow::MyButtonClick() in C:\Users\Administrator\Desktop\44444444\build-untitled-Desktop_Qt_5_10_1_MSVC2017_64bit-Debug\ui_mainwindow.h:58 QObject::connect: (sender name: 'pushButton') QObject::connect: (receiver name: 'MainWindow')