Forum > QT

[Solved] Custom Control causes QTransform error

<< < (4/4)

alanphys:
Hi Zeljko

I've found the commits that caused the problem. To answer my question above
--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---git tag -l will list the release (and other) tags.

In:
commit 9786f792401ef583ef50f21b115c5d9e9b5cb35e
Author: zeljko
Date:   Wed Apr 8 08:22:39 2020 +0000

    Qt5: implemeted TQtWidget.grabWindow(), added check if FContext is 0 in Paint event.
   
    git-svn-id: trunk@62911 -

You created TWidget.grabWindow and in
commit a64938e07ca532c9650906ad1897488c8f34186e
Author: zeljko
Date:   Wed Apr 8 13:20:36 2020 +0000

    Qt5: simplified RawImage_fromDevice()
   
    git-svn-id: trunk@62915 -

you used it. Reverting these two commits solves the problem of the controls crashing on the second monitor.

In qtlclintf.inc prior to these two commits you have the comment in line 785 in function TQtWidgetSet.RawImage_FromDevice
     // if you have dual monitors then getDeviceSize return
      // more width than screen width, but grabWindow will only grab one
      // screen, so its width will be less
      // Solution: we can either pass prefered size to grabWindow or
      // correct Description size after. I see the first solution as more correct.

I suspect that TQtWidget.grabWindow() is getting an inconsistent screen size on some dual monitor systems. I'm confident now that there is not a bug in my control and that this is a QT5 issue so I will file an issue, but I am now so far beyond my pay grade that I'm afraid this is the point where I bail.

Regards
Alan

zeljko:
Thanks for investigation, please open an issue about it, I'll see what can be done to fix it.

zeljko:
Note for me: Maybe X and Y coords in TQtWidget.grabWindow should be offsetted by screen X,Y if screen is not primary one.

alanphys:
Done

https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39780

Navigation

[0] Message Index

[*] Previous page

Go to full version