[Development] Qt 5.13 & 5.14 add device-independent pixels to device-dependent

Thiago Macieira thiago.macieira at intel.com
Fri Feb 14 21:46:32 CET 2020


On Friday, 14 February 2020 07:18:10 PST Thiago Macieira wrote:
> On Thursday, 13 February 2020 14:13:52 PST Christoph Cullmann wrote:
> > I had in Kate/Konsole and Co. broken repainting as soon as winId() was
> > called
> > on any non-native widget, see:
> > 
> > https://bugs.kde.org/show_bug.cgi?id=411965
> > 
> > If this is unrelated, just ignore me ;=)
> 
> It's probably very related. Let me see if I can modify one of our examples
> to cause this problem.

Confirmed with examples/widgets/mainwindows/sdi.

This shows *both* issues:
1) when you launch ./sdi and use the menu, it shows up in the wrong screen
2) when you resize the window to expand, it produces drawing artifacts

All four applications tested (krdc, VirtualBox's VM window, KMail main window 
and sdi example as modified) exhibit the same behaviour when it comes to 
menus: when the application is started and the window is placed on screen 2, 
the menus show on the wrong screen. After resizing the window, the menus snap 
to the right position.

All but the KMail main window also show drawing artifacts if you resize the 
window to expand, but repaint properly if you resize to shrink. The KMail main 
window shows drawing problems in expanding or shrinking.

Attachments:
- qtbase.diff: one-line change to sdi example to show the problem
- *-menu.webp: full desktop screenshot showing the menu in the wrong place
- other screenshots: showing drawing artifacts

Environment:
QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_SCREEN_SCALE_FACTORS=2;2
screen #0: 1600x900+0+0 (native: 3200x1800+0+0) Available: 1600x900+0+0
screen #1:  1920x1080+3200+0 (native: 3840x2160+3200+0) Available: 
1920x1080+3200+0

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mainwindows-sdi.png
Type: image/png
Size: 45094 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200214/bde02e8f/attachment-0001.png>
-------------- next part --------------
diff --git i/examples/widgets/mainwindows/sdi/mainwindow.cpp w/examples/widgets/mainwindows/sdi/mainwindow.cpp
index c3cd131923..56ad67219f 100644
--- i/examples/widgets/mainwindows/sdi/mainwindow.cpp
+++ w/examples/widgets/mainwindows/sdi/mainwindow.cpp
@@ -147,6 +147,7 @@ void MainWindow::init()
 
     textEdit = new QTextEdit;
     setCentralWidget(textEdit);
+    textEdit->winId();
 
     createActions();
     createStatusBar();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mainwindows-sdi-menu.webp
Type: image/webp
Size: 183246 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200214/bde02e8f/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: virtualbox-vm.webp
Type: image/webp
Size: 58902 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200214/bde02e8f/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: virtualbox-vm-menu.webp
Type: image/webp
Size: 342718 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200214/bde02e8f/attachment-0005.bin>


More information about the Development mailing list