Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QGraphicsWebView : Resize viewport without scaling up/down content



  • Hello,

    I'm searching for clues !

    I have two Qt apps (1 => qt 4.8 and 2 => qt 5.5) really close to each other. They both permit to attach HTML widgets to a scene. With the same HTML widget, I have two different behaviors on resizing, and I can't figure out if it comes from changes between apps codes or in QGraphicsWebView differences between the two versions.

    With Qt 4.8 (the behavior I want)
    0_1564560019766_notes-1.png

    1_1564560019770_notes-2.png

    With Qt 5.5 (the behavior I don't want)

    2_1564560019771_notes-3.png

    3_1564560019771_notes-4.png

    As you can see, In the first case the viewport is resized and the scroll bars disappear.
    In the second one, the scroll bars are scaled up like if it was an image...

    If you have any clue which could explain this difference, it would be very helpful.

    These are the main classes involved in the instanciation of the HTML widgets in the respectively qt4.8 and qt5.5 apps
    https://github.com/Sankore/Sankore-3.1/blob/master/src/domain/UBGraphicsWidgetItem.cpp
    https://github.com/OpenBoard-org/OpenBoard/blob/master/src/domain/UBGraphicsWidgetItem.cpp

    I tried to figure out if it was a matter of size policy, itemChange() differences, min/max sizes, but I don't find anything that could explain this.

    Thanks in advance for your help !


  • Lifetime Qt Champion

    Hi,

    While this clearly looks like a regression, Qt 5.5 is way outdated. Please test against a more recent version. Qt 5.12.4 is the current LTS but you can also try Qt 5.13.0 which is the current release.


Log in to reply