Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. [SOLVED] Qt 5: handling of CSS imports in QtHelp
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Qt 5: handling of CSS imports in QtHelp

Scheduled Pinned Locked Moved Qt WebKit
2 Posts 1 Posters 2.4k 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.
  • A Offline
    A Offline
    agarny
    wrote on last edited by
    #1

    Hi,

    I use QtHelp for my application's help. It's all very simple HTML and CSS code. In my help's home page, I link a CSS file as follows:
    @<link href="res/stylesheet.css" rel="stylesheet" type="text/css"/>@
    Then, in my res/stylesheet.css file, I import another CSS file as follows:
    @@import "/doc/res/common.css";@
    /doc is the root folder for my application's help and it's how QtHelp (in Qt 4.8) used to require the import to be done (see this "previous thread of mine":http://www.qtcentre.org/threads/47164-Problem-with-SDK-1-2-(Qt-4-8).

    However, now, the above @import statement just doesn't work, meaning that my application's help doesn't get styled anymore.

    So, was I doing the right thing before and/or have things changed in Qt 5? What is certain is that if I include my CSS code directly in res/stylesheet.css, then everything is fine, telling me that the issue is with @import...

    Anyway, any help would be much appreciated...

    Cheers, Alan.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      agarny
      wrote on last edited by
      #2

      FWIW, I just came back to the above issue and found out what happened. Basically, the syntax changed (?) between Qt 4 and Qt 5. So, rather than having:

      @@import "/doc/res/common.css";@

      We should now have:

      @@import "qthelp://namespace/virtualFolder/doc/res/common.css";@

      Now, I wish it had been documented somewhere...

      1 Reply Last reply
      0

      • Login

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