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

How to properly scale a QuickControls2 Popup



  • Hi There!

    I have troubles resizing/scaling the QML QuickControls2 Popup item. The specification shown here: https://doc.qt.io/qt-5.10/qml-qtquick-controls2-popup.html shows the scale property, but this does nothing to the popup. Only when setting this property for the subitems background and ContentItem, the Popup looks to scale properly.

    However, the actual non-visible width and height of the Popup itself have not changed, causing the clickable area being (in the case of scaling down), greater than the visible Popup. This has the effect that if you want to close the popup by clicking outside the Popup its doesn't work, until you are outside the not visible part of the actual Popup dimensions.

    Alternatively I can use Transform { Scale }} for the background and ContentItem, but this results in the same behavior.

    Scaling works fine for any other item (e.g. a QTQuickControls2 Page) but not for the Popup. I hope teh above is clear and I hope someone can help me out!


Log in to reply