Why do text items have different results on the screen?
-
Hello,
I have two development environments.
1.Windows8.1 64bit graphics 1920x1080 (moniter 15.6 inch)
2. Linux 64Bit Graphics 1920x1080 (moniter 23 inch)I created QTextEdit using QProxyWidget in QGraphicsScene.
The size of this item is 300x300,
The font size of the text in the item is setFontSize (22) as follows.However, in the development environment of No. 1, QTextEdit has a scroll bar, so the text is not visible.
In development environment 2, the text was clearly visible without scroll bars.Same item size, same text size, but why this difference ??
Is there any way to look the same ??
-
DPI scaling. Windows is likely showing everything scaled up by 150%.
-
Hello,
I have two development environments.
1.Windows8.1 64bit graphics 1920x1080 (moniter 15.6 inch)
2. Linux 64Bit Graphics 1920x1080 (moniter 23 inch)I created QTextEdit using QProxyWidget in QGraphicsScene.
The size of this item is 300x300,
The font size of the text in the item is setFontSize (22) as follows.However, in the development environment of No. 1, QTextEdit has a scroll bar, so the text is not visible.
In development environment 2, the text was clearly visible without scroll bars.Same item size, same text size, but why this difference ??
Is there any way to look the same ??
-
@Pada_
You are setting font size in pixels,
depending on your screens pixel density you will have different result
https://doc.qt.io/qt-5/scalability.html -
@LeLev
@sierdzioSetPointSize & setPixelSize exists in QFont Class.
When setting FontSize in QFont,
If setPixelSize is set, not setPointSizeCan I check the result of the same shape in development environment with different resolution?
@Pada_ said in Why do text items have different results on the screen?:
Can I check the result of the same shape in development environment with different resolution?
IMHO no
you can ensure the final aspect is the same on any screen by using techniques from the link -
@Pada_ said in Why do text items have different results on the screen?:
Can I check the result of the same shape in development environment with different resolution?
IMHO no
you can ensure the final aspect is the same on any screen by using techniques from the link -
@Pada_ said in Why do text items have different results on the screen?:
Can I check the result of the same shape in development environment with different resolution?
IMHO no
you can ensure the final aspect is the same on any screen by using techniques from the link@LeLev
@sierdzioQTextEdit is the same size as the photo, and Font is the same size.
The first picture is a capture picture on Linux.
The second picture is a capture picture in Windows.
Why does QTextEdit and QFont Size change strangely in WIndows? I have a scroll bar. -
@LeLev
@sierdzioQTextEdit is the same size as the photo, and Font is the same size.
The first picture is a capture picture on Linux.
The second picture is a capture picture in Windows.
Why does QTextEdit and QFont Size change strangely in WIndows? I have a scroll bar. -
Why does QTextEdit and QFont Size change strangely in WIndows? I have a scroll bar.
You are using different fonts (notice that letter "t" has different shape, for example), so they can have different sizes.
Plus, as I mentioned, you very probably have DPI or font scaling enabled on Windows. As far as I know Windows used 150% scaling by default on most screen sizes nowadays.
-
I haven't looked for upscaling yet,
I think it can be done because of upscaling, as it works well on Linux OS and comes out large on other resolutions of Windows.But why does Windows control upscaling?
Also, is there a way to get the upscaling currently applied to Windows?Windows uses 150% by default, so
Can I create it by reducing 150%?
-
Hi
You can try disable DPI scale for your app and see if that works the way you want.
https://doc.qt.io/qt-5/highdpi.htmlThe text factor used by Windows is controlled by the user and an app should not change that.
(unless its just for your systems and you can just change it ) -
Hi
You can try disable DPI scale for your app and see if that works the way you want.
https://doc.qt.io/qt-5/highdpi.htmlThe text factor used by Windows is controlled by the user and an app should not change that.
(unless its just for your systems and you can just change it ) -
DPI per monitor
<Application> -Platform window: dpi awareness = 2
I set it up, but it remains the same.Even if the window magnification is set to 125% and 150%, I would like to see it at 100%.