How to apply a style sheet to a Gambas QT application?

New to Gambas? Post your questions here. No question is too silly or too simple.
Post Reply
JumpyVB
Posts: 75
Joined: Friday 11th September 2020 9:09am

How to apply a style sheet to a Gambas QT application?

Post by JumpyVB »

How does one apply a style sheet (such as https://github.com/githubuser0xFFFF/QtF ... design.css) to a Gambas QT application?

Or is it a QT Creator https://www.qt.io/product/development-tools only feature https://doc.qt.io/archives/qt-4.8/style ... mples.html and completely unsupported in Gambas?
Online
User avatar
thatbruce
Posts: 168
Joined: Saturday 4th September 2021 11:29pm

Re: How to apply a style sheet to a Gambas QT application?

Post by thatbruce »

You can make stylesheets for QT5 (using the qt config thingy, I forget its name, qt5ct or something) but it will apply to the entire user session so I think you'll have to come up with fairly unique names. I have no idea whether QT has the same "impeding catastrophe" or "danger Will Robinson" properties for their buttons though.
I have used this before to "correct" some of the styles "kindly" imposed by my distro. Such as "bold" means "white text on a black background" which obviously attracts those with the IQ of a 4yo as a "great idea".
bruce
(btw, there are a couple of other things you may need to swing an axe at when using qt styling from within Gambas, they live in the users environment variables, "QT_CONFIG" things. I am sorry but I don't have the time at present to recall them.)
Have you ever noticed that software is never advertised using the adjective "spreadable".
JumpyVB
Posts: 75
Joined: Friday 11th September 2020 9:09am

Re: How to apply a style sheet to a Gambas QT application?

Post by JumpyVB »

thatbruce wrote: Sunday 10th September 2023 9:48am You can make stylesheets for QT5 (using the qt config thingy, I forget its name, qt5ct or something) but it will apply to the entire user session so I think you'll have to come up with fairly unique names. I have no idea whether QT has the same "impeding catastrophe" or "danger Will Robinson" properties for their buttons though.
I have used this before to "correct" some of the styles "kindly" imposed by my distro. Such as "bold" means "white text on a black background" which obviously attracts those with the IQ of a 4yo as a "great idea".
bruce
(btw, there are a couple of other things you may need to swing an axe at when using qt styling from within Gambas, they live in the users environment variables, "QT_CONFIG" things. I am sorry but I don't have the time at present to recall them.)
Thank you for pointing me to the right direction
Post Reply