feat(framework): add helper method to TUWidgetLayoutViewBase which returns the frame which contains this TULayoutView
This commit is contained in:
parent
6c205d476b
commit
7477821b9b
@ -57,6 +57,17 @@ public:
|
||||
|
||||
void isTULayoutView() override {}
|
||||
void disconnectView() override {}
|
||||
TULayoutFrame *getOwnerFrame() {
|
||||
auto lm = PLUG_Services::getLayoutManager();
|
||||
if (!lm) {
|
||||
return nullptr;
|
||||
}
|
||||
auto frame = lm->findFrame(this);
|
||||
if (!frame) {
|
||||
return nullptr;
|
||||
}
|
||||
return frame;
|
||||
}
|
||||
|
||||
protected:
|
||||
QPointer<T> m_widget;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user