Is it possible to place a QRect on the ui without using a QGraphicsScene?
-
As aforementioned. Looking through the QRect documentation, I haven't been able to find any documentation discussing whether QRect can be placed on the ui without using a QGraphics scene. Please let me know if more information is required.
-
As aforementioned. Looking through the QRect documentation, I haven't been able to find any documentation discussing whether QRect can be placed on the ui without using a QGraphics scene. Please let me know if more information is required.
@Dummie1138 QRect is not a widget, so cannot be visible. What you can use instead is QFrame.
-
@Dummie1138 QRect is not a widget, so cannot be visible. What you can use instead is QFrame.
@jsulm By that, do you specifically mean placing a QFrame around the QRect, or just building a QFrame in the shape of a QRect? I think I've seen both as viable options according to the documentation.
-
@jsulm By that, do you specifically mean placing a QFrame around the QRect, or just building a QFrame in the shape of a QRect? I think I've seen both as viable options according to the documentation.
@Dummie1138 said in Is it possible to place a QRect on the ui without using a QGraphicsScene?:
QFrame around the QRect
Again: QRect is NOT a widget, so you cannot place anything "around" it.
Just call https://doc.qt.io/qt-6/qwidget.html#geometry-prop on your QFrame and pass it your QRect.