Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[Solved] Snippet with parameter in Qt Creator?



  • I'm reading about the new goodies in Qt Creator.

    I like the way we can add our own code snippets using autocompletion and local storage ( I don't know if it was already there, but i didn't use it before in Qt Creator)

    I wondered if it's possible to use parameters in a snippit?
    Eg.
    Void foo( int $PARAMETER$) {
    int width = $PARAMETER$;
    ...
    }

    when you insert the snippit you get an input to change the parameter with what you want?



  • qt Creator Reference documentation says you have to use TAB to go to the parameter you want, then change it and all occurences will change also.

    Nice!


Log in to reply