Customed QWidget can't get the size after layout by calling adjustSize()
Unsolved
General and Desktop
-
When using normal QWidget(not customed) can get the size in a layout by calling adjustSize(), but I am wondering how to do the same thing in a Customed QWidget.
(QWidget may be a QLbael, or QGraphicsView etc.) -
I'm not sure if understood your question right, but it makes no difference whether you have a standard
QWidget
or any customQWidget
derived class.
Every QWidget function will also work for custom widgets. -
@Pl45m4 but my custom qwidget when I call adjustSize() it became QtCore.QSize(), but if is normal one that it will return a specific size which is the correct size in layout.
-
Does your custom widget have a valid parent or a sizeHint set?