Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator QSS Syntax Highlighting Support

Qt Creator QSS Syntax Highlighting Support

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 3 Posters 2.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sandro4912
    wrote on 18 Sept 2019, 17:03 last edited by
    #1

    I have a project were i added a .qss file to provide a custom style. However in Qt Creator theres no syntax highlighting and it looks like this:

    0_1568826084493_3521a5b4-7ebf-4cb4-a13a-e6d93906a9bf-image.png

    I already tryed the suggestion from the internet to threat the code like .css but still no highlighting.

    0_1568826144335_45c15ad5-a820-4c27-a0bb-99e43e9533df-image.png

    So how to add it properly?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 19 Sept 2019, 05:39 last edited by
      #2

      Qt Creator does not support highlighting of QSS code. I guess the best way to "enable" it is to write the highlighter and commit it to Qt Creator repository.

      As a cheap workaround you could use Kate or Gedit to edit QSS, they do have some highlighting support for QSS.

      (Z(:^

      A 1 Reply Last reply 19 Sept 2019, 06:16
      2
      • S sierdzio
        19 Sept 2019, 05:39

        Qt Creator does not support highlighting of QSS code. I guess the best way to "enable" it is to write the highlighter and commit it to Qt Creator repository.

        As a cheap workaround you could use Kate or Gedit to edit QSS, they do have some highlighting support for QSS.

        A Offline
        A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on 19 Sept 2019, 06:16 last edited by
        #3

        @sierdzio said in Qt Creator QSS Syntax Highlighting Support:

        As a cheap workaround you could use Kate or Gedit to edit QSS, they do have some highlighting support for QSS.

        But if Kate can do it, QtCreator should be able too. The Generic Highlighter is base on Kate's engine: https://doc.qt.io/qtcreator/creator-highlighting.html#generic-highlighting

        Qt has to stay free or it will die.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 19 Sept 2019, 07:15 last edited by
          #4

          Yes, it should. Since OP mentioned modifying MIMEs I assumed Kate files did not work or not well enough (even in Kate I get only very very basic highlighting for QSS).

          (Z(:^

          1 Reply Last reply
          1

          2/4

          19 Sept 2019, 05:39

          • Login

          • Login or register to search.
          2 out of 4
          • First post
            2/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved