Important: Please read the Qt Code of Conduct -

How to toggle visibility of a QRect

  • Is there a way to toggle the visibility of a QRect from QML? I created one in C++:

    QRect                    miniMapRect;
    miniMapRect = QRect(20, int(pThis->height() - 130 - hPart),
                                int(pThis->width() / miniDivisor), hPart);

    but I am not sure how to go about toggling it's visibility from QML.

    I suppose I can just use the setHeight and setWidth functions for this.

  • Qt Champions 2018

    a QRect is not a visual element.

    Can you give us more detail about your code? Especially the UI part.

Log in to reply