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

QtCreator should autocomplete signal parameters in QML signal handlers

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None
    • Quick / QML Support
    • None

    Description

      There's no way to know the names of the parameters in a QML signal handler without looking at the signal doc/declaration. Adding autocomplete for signal parameters in handlers would be very useful.

      For example in a MouseArea, the clicked signal has a MouseEvent mouse parameter. Qt Creator knows that because it colorize mouse in the signal handler, but it doesn't suggest it in the autocomplete list.

      Putting the parameters of the signal at the top of the autocomplete list would be much more useful than the current useless (in this context) code expansions, see screenshot-1.png.

      Having the type of the parameters would also be great, either directly inline in the box near the variable name, or as a tooltip on click (like the code expansions).

      Additionally, showing the parameters when trying to autocomplete while calling a function would be good too.
      (Currently typing onClicked: foo( and then triggering the autocomplete will show the signature of the foo function in a tooltip. I'm not suggesting to hide the tooltip, just to add the autocompletion box with the paramaters)

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            grecko Pierre-Yves Siret
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes