Reputation: 389
When I try widget->resizeEvent =
I get this error:
And when I try to listen to the resizeEvent
using a lambda:
connect(widget, &QWidget::resizeEvent, [](QResizeEvent *event) { });
'QWidget::resizeEvent': cannot access protected member declared in class 'QWidget'
Based on answers found here, I tried the above things, where they override the resizeEvent
from outside the class.
This is not possible anymore?
The unique options to listen to the resizeEvent
is adding filter or subclassing?
Upvotes: 0
Views: 63
Reputation: 52337
Subclassing and event filters are the only options you have in Qt5, Qt6. The trick you refer to is Python-only and Qt4. Events are also not signals, so you cannot connect them.
Sadly, the answer to your question simply is: you can't.
Upvotes: 0