Qt World Summit: Register Today!

QT Creator 4.8.1 (Community) fails to autocomplete SIGNALS and SLOTS

  • Hi all
    With version 4.8.1 of QT Creator for windows, the IDE has problem to autocomplete SIGNALS and SLOTS in the IDE.
    I think the issue starts from the parsing of "signals" and "public slots" in the Class declaration, because they don't turn "green" which should be the correct behaviour for the recognized keyword.
    The problem affects also built in QT types, like buttons.
    In order to reproduce the problem, create an application project, create a QButton and try to connect button instance SIGNAL clicked to SLOT with:

    connect(button, SIGNAL(clicked(bool)), this, SLOT(actionButton()));

    after having started "SIGNAL( " the IDE should prompt a list of signals belonging to button instance which is QButton, but it does not happen, the same with the SLOT

  • Lifetime Qt Champion

    Hi @Menion,

    this is a known issue: QTCREATORBUG-20737

    You have two options:

    1. Switch to the new connect syntax (very recommended!): https://wiki.qt.io/New_Signal_Slot_Syntax
    2. Disable the Clang Code Model: Qt Creator > Help > About Plugins > Clang Code Model


  • Moderators

    From the bugreport:

    // at this point, only &QThread:: members makes sense. However,
    // I have to type "&QThread::" myself to get the member list.
    // The same applies to the slot.

    Not exactly true, &QObject:: members also make sense, albeit they're already in the scope of QThread.

Log in to reply