Ability to change specific items font sizes in specific qt based programs

I was wondering if anyone knew if it was possible to be able to change the font sizes for specific items within specific qt based applications only?
When I say specific items I am referring to things such as…
Menu bar
Menu bar drop downs
Dialog boxes
Input fields
Context menus

I am currently using a gtk3 based DE, which allows users the abliity to be able to achieve this in the gtk.css file. You can change set the fonts sizes for all / any items per application. Recently was helped to discover that this could also be achieve in gtk2 which is done using gtkrc2.0 file by adding environment variables to this file.

I was wondering if this was something that would be possible to achieve using some qt based KDE applications in a gtk DE? Does qt use environment variables for fonts similar to how gtk2 does? I have seen some things mentioned about SCALING & DPI but sounds like more of a global setting. Rather new to Linux so as much detail as possible would be appreciated.

Can start simple, say you wanted to change the font size to 18 for just the “menu bar” & “tabs” in qt5 applications such as Dolphin or KWrite?

  • Do I have to create a text file to put these variables in?
  • Location where to put this text file?
  • Things to add to the programs CL launch to load these environment variables

Thank You to anyone who reads this and for any help provided

Not easily.

What’s your desired and goal, and why doesn’t the standard scaling system in System Settings > Display & monitor work for you?

if you click on the desktop and type “fonts” you can go the settings page from the search results and there are half a dozen adjustments you can make to various parts of the GUI, or you can scale everything up/down together using the adjusts all fonts button.

Thank you guys for the responses.
Ah that is unfortunate.
I guess to explain a little further my GTK based DE only provides one font setting to adjust just fonts which applies globally to every single font in DE & also all applications fonts, which is not desired.
Same thing with DPI scaling, I don’t want to increase the size of all fonts / GUI either.

I am looking to be able to have a little bit more control with the fonts sizes per specific program as well as specific fonts within that program.
For example if I want a larger font for tab names, I don’t necessarily want that same large font in other areas of a program, like maybe Options which could cause GUI issues with large fonts, if this makes sense.
Or say you have a specific program that you want to be further away from monitor to use, you don’t want all your applications to have this large font, just a specific program.
I know these ideas are general but want to be able to have the control of font sizes I have with GTK based toolkits.

As mentioned I can achieve this with GTK3 with gtk.css file & I can achieve this a little more difficultly in GTK2 with .gtkrc2.0 file with “enivironment variables”
just don’t know of a way to do this with QT5 based applications.

Now when you say “not easily” to be honest I had to get a good amount of help with the GTK3 and even more help to figure out how to do this in GTK2 which is more involved.
So these would not be considered to be “easy”
Do you know if doing this in QT is more difficult then items mentioed above about GTK?
Do you know if QT provides similar “enivironment variables” that can be added to a text file that program could be linked to in its launch command.
Seems strange that GTK would have all these font based EVs and QT doesn’t.

Anyways if either of you or anyone else has any ideas please let me know, really can’t seem to figure this one out

Thank You

I am still interested in this if anyone has any info to share.
Thank You

Just to point out something that makes a huge difference in this case. QT is not KDE and KDE is not QT. There are things that QT does which are out of KDE’s control.

I am not a coder or a developer, but there are QT apps that do not perform as I would expect them to. One of the devs around here would know more about that though.

…Okay, thank you for that clarification.

Someone mentioned to me about “qt5ct” application that offers access to QSS files.
Apparently Qt created QSS which is based on CSS which seems a little confusing to keep making new versions of things, but I am sure there was a reason that I am unaware of.

Anyways, does anyone know by any chance if this QSS can function similiar to how I mentioned that the GTK3 gtk.css file can achieve this? Where you can type in “environment variables” (might not be the proper terminology for QSS/CSS) into this file to change specific items font sizes?
For example:
menubar menuitem label {font-size: 16pt}
changes the font size for all GTK3 based applications, menu bars.

Thank You