Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Widgetset
»
QT
»
Scaling the QT 5 application
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Heaptrc reports unfreed m...
by
Hartmut
[
Today
at 03:01:32 pm]
Help with search and repa...
by
CM630
[
Today
at 12:54:09 pm]
Initialize list in functi...
by
PeterHu
[
Today
at 10:33:27 am]
Lazarus Blowfish
by
Thaddy
[
Today
at 09:30:07 am]
Tips for cross-compiling ...
by
Seenkao
[
Today
at 09:25:29 am]
An Idea for a helpful uti...
by
Thaddy
[
Today
at 08:27:38 am]
Drawing a picture on the ...
by
DMH
[
Today
at 05:01:07 am]
Anyone interested in help...
by
ad1mt
[November 09, 2025, 07:57:13 pm]
How detect a keypress in ...
by
Remy Lebeau
[November 09, 2025, 07:49:50 pm]
Paradox date filter
by
tawfiq-lz
[November 09, 2025, 07:46:20 pm]
Why is there no Chinese s...
by
Ten_Mile_Hike
[November 09, 2025, 06:55:11 pm]
Convert table to JSON arr...
by
paweld
[November 09, 2025, 05:56:56 pm]
Unexpected lack of error ...
by
n7800
[November 09, 2025, 05:39:10 pm]
FPC 3.2.4-rc1 available
by
pleumann
[November 09, 2025, 05:12:32 pm]
application crashes on st...
by
Thaddy
[November 09, 2025, 04:17:28 pm]
Blog area?
by
Martin_fr
[November 09, 2025, 02:00:17 pm]
SimpleXML
by
ednaldomoreira
[November 09, 2025, 01:45:18 pm]
What happens if you use "...
by
Thaddy
[November 09, 2025, 01:39:12 pm]
CustomDraw package compil...
by
lainz
[November 09, 2025, 01:21:58 pm]
Register global hotkey
by
Thaddy
[November 09, 2025, 12:46:46 pm]
How to port TArray.Sort?
by
Thaddy
[November 09, 2025, 12:20:36 pm]
Dynamic libraries in Linu...
by
Fred vS
[November 08, 2025, 10:28:42 pm]
FPC v3.2.2 internal error
by
440bx
[November 08, 2025, 09:15:48 pm]
Distance of gridlines in ...
by
wp
[November 08, 2025, 08:08:14 pm]
Lazarus portable?
by
PascalDragon
[November 08, 2025, 06:29:28 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Scaling the QT 5 application (Read 640 times)
7bit
New Member
Posts: 24
Scaling the QT 5 application
«
on:
September 17, 2025, 09:27:46 pm »
My application does not scale when I change the scale of the desktop environment. When I launch my application, the interface does not scale. Although Lazarus IDE with QT5 scales. Everything is working fine in Windows. Maybe something needs to be turned on?
Logged
zeljko
Hero Member
Posts: 1792
Re: Scaling the QT 5 application
«
Reply #1 on:
September 17, 2025, 09:47:38 pm »
Have you turned on scaling in your project options (in that case you'll have Application.Scaled := True in your .lpr file), or just add manually APplication.Scaled := True in your .lpr, before Application.initialize.
Logged
7bit
New Member
Posts: 24
Re: Scaling the QT 5 application
«
Reply #2 on:
September 18, 2025, 06:06:07 am »
Yes. I'm creating a simple QT5 application and it also doesn't scale. I was wrong about Lazarus. It doesn't scale either. This GTK2 build scales, but QT5 does not.
My IDE: Lazarus 4.3 (rev lazarus_4_2-26-g44b59001af) FPC 3.2.3 x86_64-linux-qt5
OS: Alt Workstation 10.4 (Mate Desktop)
Logged
zeljko
Hero Member
Posts: 1792
Re: Scaling the QT 5 application
«
Reply #3 on:
September 18, 2025, 08:06:14 am »
Qt5 > 5.14 and Qt 6 changed how they use scaling. DPI is not relevant anymore but only scale eg 1.5, 2.0 etc. So to test if it'll work for you try this from terminal: export QT_FONT_DPI=96 export QT_SCALE_FACTOR=1.5 ./yourqt5application .
Logged
7bit
New Member
Posts: 24
Re: Scaling the QT 5 application
«
Reply #4 on:
September 18, 2025, 01:18:32 pm »
Thanks! It works. It's just not very nice; the app just scales down the low-resolution icons. When I set QT_FONT_DPI=144 and removed QT_SCALE_FACTOR, the app started using higher-resolution icons. I liked the result.
Logged
zeljko
Hero Member
Posts: 1792
Re: Scaling the QT 5 application
«
Reply #5 on:
September 18, 2025, 03:34:51 pm »
It is pretty messy with scaling qt5 and qt6 nowadays (in LCL perspective). Note that under KDE Plasma 5 I don't have to export anything for qt5 widgetset, but must for qt6. On KDE Plasma 6 is viceversa
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Widgetset
»
QT
»
Scaling the QT 5 application
TinyPortal
© 2005-2018