texstudio
texstudio copied to clipboard
Graphics artefacts in integrated PDF viewer
Environment
- TeXstudio: 4.0.0
- Qt: 6.1.3 R
- OS: Windows 10 21H1 (64bit)
- TeX distribution: MiKTeX "current" (all packages updated)
Expected behavior
Graphics preview in the integrated PDF viewer should work without problems, as it did with ver 3.1.2 and previous versions.
Actual behavior
When scrolling through a document/PDF preview, graphics (e.g. in figures) sometimes have strange artefacts -- in my case single white lines, mostly horizontal. When zooming in using the round magnifying glass, the problem gets worse. See attached screenshot.
How to reproduce
Create a document with graphics, e.g. \includegraphics{} with a PNG or JPG file. Scroll and/or zoom around in the produced output.
This even happens without graphics it seems. You can also notice white artifact lines in text and captions. Most of the times during/after magnifying. It does not matter whether the PDF viewer is docked or undocked. I tried forcing my NVIDIA GPU to be used with TeXstudio (instead of integrated Intel GPU/CPU), but the GPU doesn't seem to be used. I also tried rebooting and re-compiling several times. The only difference I can spot is indeed upgrading TeXstudio from 3.1.2 to 4.0.0...
Qt6 bug. Qt6 does not work properly for scaling factor like 125% (100% or 150%) is okay. Bug is reported and confirmed. Change the scaling factor or use Txs qt5 version.
I am having the same issue and scaling for my PDF viewer is set to 100%. Am I missing something?
Environment:
- TexStudio: 4.0.0
- Qt: 6
- OS: Windows 10 (64bit)
- TeX distribution: MiKTeX-pdfTeX 4.1 (MiKTeX 20.12)
Observed issue:
PDF Viewer settings:
Thx for confirming the bug and the workaround (works and is ok for now). @aaron-hurst , the scaling factor @sunderme means is the global app/font scaling in Window 10. It'll affect all other programs and your desktop as well. See 2nd item here: https://support.microsoft.com/en-us/topic/make-text-and-apps-bigger-c3095a80-6edd-4779-9282-623c4d721d64 . Mine was set to 125%, which caused the problem.
Qt6 bug. Qt6 does not work properly for scaling factor like 125% (100% or 150%) is okay. Bug is reported and confirmed. Change the scaling factor or use Txs qt5 version.
Is it this bug? https://bugreports.qt.io/browse/QTBUG-91239 Could this help? https://doc.qt.io/qt-6/qguiapplication.html#setHighDpiScaleFactorRoundingPolicy
it is reported here https://bugreports.qt.io/browse/QTBUG-95957
The version with Qt5 works fine for me. It could be the Qt6 bug as said by @sunderme
I am currently experiencing this issue. My workaround is to go to texstudio.exe right-click properties window>compatibility>"Change high DPI settings", check "Override high DPI scaling behavior." and set list item to "System". This method avoids having to change scaling systemwide. Program items are slightly bigger but glitch is no longer present.
qt 6.3 beta3 fixes the issue.
texstudio.exe right-click properties window>compatibility>"Change high DPI settings"
If your window manager does not support that, setting QT_SCALE_FACTOR
for texstudio (e.g. to 0.8
if your system scale is 125%) also fixes the problem without having to change system-wide scaling.