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

QtCreator should autocomplete signal parameters in QML signal handlers

XMLWordPrintable

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

      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)

        1. screenshot-1.png
          32 kB
          André Hartmann
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:

                There are no open Gerrit changes