Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. QWebEngineView css
Forum Updated to NodeBB v4.3 + New Features

QWebEngineView css

Scheduled Pinned Locked Moved Unsolved QtWebEngine
6 Posts 2 Posters 1.5k 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.
  • T Offline
    T Offline
    TThy
    wrote on last edited by
    #1

    Hi all ,

    I try to use css and in particular the grid properties

    #header {
      border-bottom: 3px #0a162e solid;
      background: #2085e2;
      background: linear-gradient(90deg, #2085e2 0%, #1064b0 21%, #142f4a 100%);
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      grid-gap: 10px;
      grid-auto-rows: minmax(100px, auto);
    }
    #date {
      grid-column: 1/2;
      grid-row: 1;
      text-align: left;
    }
    #time {
      grid-column: 2/3;
      grid-row: 1;
      text-align: right;
    }
    

    In chrome debugger :
    11214e8e-cff9-4017-b1a1-bfeba8e125a1.jpg

    When we put the cursor on display: grid it says "Invalid property value".

    Is it possible to use the grid properties with qtwebengine?

    Thx all

    T

    JonBJ 1 Reply Last reply
    0
    • T TThy

      Hi all ,

      I try to use css and in particular the grid properties

      #header {
        border-bottom: 3px #0a162e solid;
        background: #2085e2;
        background: linear-gradient(90deg, #2085e2 0%, #1064b0 21%, #142f4a 100%);
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 10px;
        grid-auto-rows: minmax(100px, auto);
      }
      #date {
        grid-column: 1/2;
        grid-row: 1;
        text-align: left;
      }
      #time {
        grid-column: 2/3;
        grid-row: 1;
        text-align: right;
      }
      

      In chrome debugger :
      11214e8e-cff9-4017-b1a1-bfeba8e125a1.jpg

      When we put the cursor on display: grid it says "Invalid property value".

      Is it possible to use the grid properties with qtwebengine?

      Thx all

      T

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @TThy
      No. If it's not documented in https://doc.qt.io/qt-5/stylesheet-reference.html#list-of-properties, it does not work. None of your grid-* properties appear there, only gridline-color does.

      EDIT I have left this in, because it shows I jumped too soon! The above is for QWidgets. You have QWebEngineView. My bad. So that's proper CSS, and down to the Chromium engine.

      I don't know whether your issue might be because you put these properties on <header>? Does it make any difference if you put them on a <div>?

      1 Reply Last reply
      0
      • T Offline
        T Offline
        TThy
        wrote on last edited by
        #3

        unfortunately no difference .
        And the same code is ok to chrome.
        T

        JonBJ 1 Reply Last reply
        0
        • T TThy

          unfortunately no difference .
          And the same code is ok to chrome.
          T

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @TThy
          Can you discover (I don't know how) what version of Chromium you are using here from QWebEngineView?

          P.S.
          I see from e.g. you can test for features, like:

          @supports not (display: grid) {
              .item {
                  /* CSS from browsers which do not support grid layout */
              }
          }
          

          Give that principle a go?

          1 Reply Last reply
          0
          • T Offline
            T Offline
            TThy
            wrote on last edited by
            #5

            The doc said :
            This version of Qt WebEngine is based on Chromium version 80.0.3987, with additional security fixes from newer versions.

            1 Reply Last reply
            0
            • T Offline
              T Offline
              TThy
              wrote on last edited by
              #6

              And if i test with your code the qtwebengine don't support grid

              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