Dodawanie fragmentów kodu do menu autouzupełniania

Aby dodać fragmenty kodu lub tekstu w edytorze fragmentów:

  1. Wybierz opcję „ Preferences ” > „ Text Editor ” > „ Snippets ”.

    Zakładka „Fragmenty” w ustawieniach edytora tekstu

  2. W oknie „ Group ” wybierz typ fragmentu, który chcesz dodać.
  3. Wybierz opcję „ Add ”.
  4. Określ wyzwalacz. Jeśli wyzwalacz jest już używany, dodaj opcjonalny wariant. Pojawią się one na liście sugestii podczas pisania kodu. Określ również ciąg tekstowy lub konstrukcję kodu C++ lub QML w edytorze fragmentów kodu, w zależności od kategorii fragmentu.

    W fragmentach kodu można używać predefiniowanych zmiennych.

Zobacz także: Uzupełnianie kodu CMake, Uzupełnianie kodu, Korzystanie ze zmiennych „ Qt Creator ”, Uzupełnianie, Nim oraz Fragmenty kodu.

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.