Building with stylesheet support on GNU/Linux
-
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!
-
@elazul Look into the QWidget header and see what feature disables the setStyleSheet() function. Enable this function.
-
@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?
-
@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. -
@elazul said in Building with stylesheet support on GNU/Linux:
xkbcommon-x11 ........................ no
xcb-sm ............................... noI would install those libs.
-
@Christian-Ehrlicher @elazul Including their -dev packages.