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
Forum Updated to NodeBB v4.3 + New Features

Qt Creator QSS Syntax Highlighting Support

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 3 Posters 2.1k Views 1 Watching
  • 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 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
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on 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(:^

      aha_1980A 1 Reply Last reply
      2
      • sierdzioS sierdzio

        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.

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on 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
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on 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

          • Login

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