Getting width and height of QLabel object in realtime
-
Hello All,
I am inheriting a QLabel class in a class called LabelAnnotation and promoting it to the QLabel in the form of MainWindow.
I have a function called MapLabel, in which I need to get dynamic coordinates of the LabelAnnotation class.
How can we achieve the following?Code Sample:
class LabelAnnotation : public QLabel { ----- QList<ROI> MapLabelPointstoImage(QList<ROI>); ----- }
In the above function i need to get the width and height of the LabelAnnotation which can be resized dynamically.
-
What's wrong with QWidget::size() ?
-
@Christian-Ehrlicher : Thanks for the reply.
I want to resize my label to size of Qpixmap how can it be done
-
@Kira said in Getting width and height of QLable object in realtime:
I want to resize my label to size of Qpixmap how can it be done
Read my link, you will find a function to resize the widget there...
-
@Christian-Ehrlicher :ok thanks