Unsolved How to Draw circle in tabwidget ?
-
Hi,
I have added two tabs in my Qwidget directly using Qtdesigner
so how can I draw circle in tab?
If any related link plz share. -
Hi,
Create a custom widget and do the drawing there.
-
Ok Thankyou,, I don't understand.. can u plz any example or link for reference, That might be very helpful
-
Hi
A basic widget to draw with would be like
#include <QPainter> #include <QWidget> class CircleWidget : public QWidget { public: CircleWidget ( QWidget *parent = nullptr ) : QWidget(parent) {} protected: void paintEvent(QPaintEvent *event) override { QPainter painter(this); painter.fillRect(0, 0, size().width(), size().height(), Qt::red); } };
-
@mrjj So where i can mention like mywidget should create on which tab