Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-20261

Cannot generate corresponding slot function when using slot/signal editor

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Incomplete
    • Affects Version/s: Qt Creator 4.6.0
    • Fix Version/s: None
    • Component/s: Widget Designer
    • Labels:
      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.

        1. Create a normal "Qt Widget Application"
        2. Expand the Forms folder in the project explorer, double click mainwindow.ui
        3. Drag a QPushButton to centralWidget of MainWindow
        4. Click "Edit Signals/Slot" button or press F4 entering signal and slot editing mode
        5. Drag a signal wire out from the QPushButton and drop it down on the MainWindow, connection configuration dialog popups
        6. Select "clicked()" item on the left side of the dialog window
        7. Click "Edit..." on the right side of the dialog window, Signal/Slot editor of MainWindow pops up
        8. 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
        9. 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')
      

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              kleint Friedemann Kleint
              Reporter:
              sainimu78 fan tangshan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes