Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Building with stylesheet support on GNU/Linux
Forum Updated to NodeBB v4.3 + New Features

Building with stylesheet support on GNU/Linux

Scheduled Pinned Locked Moved Unsolved Qt 6
7 Posts 4 Posters 747 Views 2 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.
  • E Offline
    E Offline
    elazul
    wrote on last edited by
    #1

    Hi there,

    I have done many qt6.x builds by now, but for an specific software, I need to build it with a feature called stylesheets, which seems to be effects support for widgets.

    I m also trying to do a minimal build, only including what's needed, so here's how I am configuring it before building:

    ../configure -release -prefix /usr/local -nomake tests -no-ssl -no-accessibility -no-dbus -no-feature-printsupport \
    -no-feature-testlib -no-feature-xml -no-feature-sql -no-feature-harfbuzz \
    -no-feature-texthtmlparser -no-feature-textmarkdownreader -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-cssparser
    

    As you can see, widgets are not disabled. But during build I get:

    /home/manuel/src/qt6/qttools/src/linguist/linguist/finddialog.cpp:45:14: error: ‘class QLineEdit’ has no member named ‘setStyleSheet’; did you mean ‘setStyle’?
       45 |         led->setStyleSheet(QStringLiteral("color: auto;"));
          |              ^~~~~~~~~~~~~
          |              setStyle
    

    So, any idea on what am I missing in order to get this stylesheet support on my QT6 build, please?

    Thanks!

    Christian EhrlicherC JonBJ 2 Replies Last reply
    0
    • E elazul

      Hi there,

      I have done many qt6.x builds by now, but for an specific software, I need to build it with a feature called stylesheets, which seems to be effects support for widgets.

      I m also trying to do a minimal build, only including what's needed, so here's how I am configuring it before building:

      ../configure -release -prefix /usr/local -nomake tests -no-ssl -no-accessibility -no-dbus -no-feature-printsupport \
      -no-feature-testlib -no-feature-xml -no-feature-sql -no-feature-harfbuzz \
      -no-feature-texthtmlparser -no-feature-textmarkdownreader -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-cssparser
      

      As you can see, widgets are not disabled. But during build I get:

      /home/manuel/src/qt6/qttools/src/linguist/linguist/finddialog.cpp:45:14: error: ‘class QLineEdit’ has no member named ‘setStyleSheet’; did you mean ‘setStyle’?
         45 |         led->setStyleSheet(QStringLiteral("color: auto;"));
            |              ^~~~~~~~~~~~~
            |              setStyle
      

      So, any idea on what am I missing in order to get this stylesheet support on my QT6 build, please?

      Thanks!

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @elazul Look into the QWidget header and see what feature disables the setStyleSheet() function. Enable this function.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • E elazul

        Hi there,

        I have done many qt6.x builds by now, but for an specific software, I need to build it with a feature called stylesheets, which seems to be effects support for widgets.

        I m also trying to do a minimal build, only including what's needed, so here's how I am configuring it before building:

        ../configure -release -prefix /usr/local -nomake tests -no-ssl -no-accessibility -no-dbus -no-feature-printsupport \
        -no-feature-testlib -no-feature-xml -no-feature-sql -no-feature-harfbuzz \
        -no-feature-texthtmlparser -no-feature-textmarkdownreader -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-cssparser
        

        As you can see, widgets are not disabled. But during build I get:

        /home/manuel/src/qt6/qttools/src/linguist/linguist/finddialog.cpp:45:14: error: ‘class QLineEdit’ has no member named ‘setStyleSheet’; did you mean ‘setStyle’?
           45 |         led->setStyleSheet(QStringLiteral("color: auto;"));
              |              ^~~~~~~~~~~~~
              |              setStyle
        

        So, any idea on what am I missing in order to get this stylesheet support on my QT6 build, please?

        Thanks!

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

        @elazul
        As @Christian-Ehrlicher syas. But at a guess wouldn't -no-feature-cssparser likely/maybe disable setStyleSheet() CSS parsing?

        E 1 Reply Last reply
        3
        • JonBJ JonB

          @elazul
          As @Christian-Ehrlicher syas. But at a guess wouldn't -no-feature-cssparser likely/maybe disable setStyleSheet() CSS parsing?

          E Offline
          E Offline
          elazul
          wrote on last edited by elazul
          #4

          @JonB Yes! Enabling cssparser made the trick and the program builds! Thanks a lot!

          However, now I am getting this on the program I am trying to run:

          qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
          This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
          
          Available platform plugins are: linuxfb, minimalegl, minimal, offscreen, eglfs, vnc, vkkhrdisplay.
          
          Aborted (core dumped)
          

          I am configuring like this:

          ../configure -release -prefix /usr/local -nomake tests -no-ssl -no-accessibility -no-dbus -no-feature-testlib \
          -no-feature-sql -no-feature-harfbuzz -no-feature-textmarkdownreader -no-feature-textmarkdownwriter -no-feature-textodfwriter
          

          I don't see any options that should disable XCB. Almost there... any ideas, please? That seems to mean there's no support for XCB on my QT6 build, right?

          I see this during QT6 configuration resume:

          Features used by QPA backends:
            evdev .................................. yes
            libinput ............................... no
            HiRes wheel support in libinput ........ no
            INTEGRITY HID .......................... no
            mtdev .................................. no
            tslib .................................. no
            xkbcommon .............................. yes
            X11 specific:
              XLib ................................. yes
              XCB Xlib ............................. yes
              EGL on X11 ........................... yes
              xkbcommon-x11 ........................ no
              xcb-sm ............................... no
          

          Which clearly seems to indicate that XCB support is disabled. But why?

          jsulmJ Christian EhrlicherC 2 Replies Last reply
          0
          • E elazul

            @JonB Yes! Enabling cssparser made the trick and the program builds! Thanks a lot!

            However, now I am getting this on the program I am trying to run:

            qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
            This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
            
            Available platform plugins are: linuxfb, minimalegl, minimal, offscreen, eglfs, vnc, vkkhrdisplay.
            
            Aborted (core dumped)
            

            I am configuring like this:

            ../configure -release -prefix /usr/local -nomake tests -no-ssl -no-accessibility -no-dbus -no-feature-testlib \
            -no-feature-sql -no-feature-harfbuzz -no-feature-textmarkdownreader -no-feature-textmarkdownwriter -no-feature-textodfwriter
            

            I don't see any options that should disable XCB. Almost there... any ideas, please? That seems to mean there's no support for XCB on my QT6 build, right?

            I see this during QT6 configuration resume:

            Features used by QPA backends:
              evdev .................................. yes
              libinput ............................... no
              HiRes wheel support in libinput ........ no
              INTEGRITY HID .......................... no
              mtdev .................................. no
              tslib .................................. no
              xkbcommon .............................. yes
              X11 specific:
                XLib ................................. yes
                XCB Xlib ............................. yes
                EGL on X11 ........................... yes
                xkbcommon-x11 ........................ no
                xcb-sm ............................... no
            

            Which clearly seems to indicate that XCB support is disabled. But why?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @elazul said in Building with stylesheet support on GNU/Linux:

            Which clearly seems to indicate that XCB support is disabled. But why?

            Actually it looks like XCB was enabled.
            If you want to know why something was disabled then check the config.log file. Usually some needed libraries are missing.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • E elazul

              @JonB Yes! Enabling cssparser made the trick and the program builds! Thanks a lot!

              However, now I am getting this on the program I am trying to run:

              qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
              This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
              
              Available platform plugins are: linuxfb, minimalegl, minimal, offscreen, eglfs, vnc, vkkhrdisplay.
              
              Aborted (core dumped)
              

              I am configuring like this:

              ../configure -release -prefix /usr/local -nomake tests -no-ssl -no-accessibility -no-dbus -no-feature-testlib \
              -no-feature-sql -no-feature-harfbuzz -no-feature-textmarkdownreader -no-feature-textmarkdownwriter -no-feature-textodfwriter
              

              I don't see any options that should disable XCB. Almost there... any ideas, please? That seems to mean there's no support for XCB on my QT6 build, right?

              I see this during QT6 configuration resume:

              Features used by QPA backends:
                evdev .................................. yes
                libinput ............................... no
                HiRes wheel support in libinput ........ no
                INTEGRITY HID .......................... no
                mtdev .................................. no
                tslib .................................. no
                xkbcommon .............................. yes
                X11 specific:
                  XLib ................................. yes
                  XCB Xlib ............................. yes
                  EGL on X11 ........................... yes
                  xkbcommon-x11 ........................ no
                  xcb-sm ............................... no
              

              Which clearly seems to indicate that XCB support is disabled. But why?

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @elazul said in Building with stylesheet support on GNU/Linux:

              xkbcommon-x11 ........................ no
              xcb-sm ............................... no

              I would install those libs.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              jsulmJ 1 Reply Last reply
              1
              • Christian EhrlicherC Christian Ehrlicher

                @elazul said in Building with stylesheet support on GNU/Linux:

                xkbcommon-x11 ........................ no
                xcb-sm ............................... no

                I would install those libs.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Christian-Ehrlicher @elazul Including their -dev packages.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                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