Reputation: 163
I use QT Creator on surface pro4 and the font of menu is too small:
what should i do to change the font size?
version:5.5
Upvotes: 14
Views: 16550
Reputation: 344
For Ubuntu users pro anno 2024:
/usr/share/applications
and it's name is org.qt-project.qtcreator.desktop
Exec=qtcreator %F
to: Exec=env QT_SCALE_FACTOR=1.5 qtcreator %F
you may need to be super user for this. Where 1.5 is a scale you may choose whatever you need. Save file.update-desktop-database
. Now it will start with required scale factor.Upvotes: 0
Reputation:
I had the same nasty problem in Ubuntu , the solution is easy.
In the top left menu , choose Tools > Options > Environment
Mark the checkbox that says "Enable high DPL scaling"
Restart and it should work
Upvotes: 5
Reputation: 57774
I had the same problem running on Linux Fedora 27/Gnome/Wayland on a 4K monitor (3840 x 2160). A microscope was nearly necessary to read most of Qt Creator's window panes.
This fixed it for me:
Create qtcreator
in an executable file in my path with this content:
QT_AUTO_SCREEN_SCALE_FACTOR=1 ~/Qt/Tools/QtCreator/bin/qtcreator $1 $2 $3 $4 $5 $6 $7 &
An alias would do just as well. It is not necessary to export any environment variables. This uses the shell syntax which sets an environment variable only for the process to be created. I have Qt installed in my directory instead of system-wide.
I got the environment variable from @joelostblom's comment on the answer here, above/below pointing to this Qt reference.
With Gnome already set to scale by 200%, a try of QT_SCALE_FACTOR=2
resulted in ridiculously large text. But using QT_AUTO_SCREEN_SCALE_FACTOR and scaling by one was enough of a nudge for it to react properly to Gnome's settings.
Upvotes: 2
Reputation: 2614
On linux mint for me, changing the desktop DPI scaling doesn't help with QT sidebar font in particular although most other things do scale.
The scale factor variable method does work though. Here's the script I used and just modify the installed menu shortcut for QtCreator to run it instead of directly running the qtcreator executable:
#!/bin/bash
#my_qtcreator.sh
export QT_SCALE_FACTOR=1.5
/opt/Qt/qtcreator-4.2.2/bin/qtcreator
Upvotes: 8
Reputation: 49289
There is no such option. You have to modify the DPI scaling of windows, which will make all "legacy" shell applications appear larger to compensate for the high DPI of the device.
If you don't want to modify the settings, you might want to try running creator with an QT_SCALE_FACTOR=2
env var or so.
Create a startScaled.cmd
in creator's exe directory with the content:
@echo off
set QT_SCALE_FACTOR=2
qtcreator.exe
And use this to start creator up-scaled.
Upvotes: 12