mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 21:25:44 +08:00
Replace CDockWidget::releaseWidget() with CDockWidget::takeWidget()
This commit is contained in:
parent
b9b8ff9c76
commit
c630a59afe
@ -263,11 +263,12 @@ void CDockWidget::setWidget(QWidget* widget, eInsertMode InsertMode)
|
|||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
void CDockWidget::releaseWidget()
|
QWidget* CDockWidget::takeWidget()
|
||||||
{
|
{
|
||||||
d->ScrollArea->takeWidget();
|
d->ScrollArea->takeWidget();
|
||||||
d->Layout->removeWidget(d->Widget);
|
d->Layout->removeWidget(d->Widget);
|
||||||
d->Widget->setParent(nullptr);
|
d->Widget->setParent(nullptr);
|
||||||
|
return d->Widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Remove the widget from the dock and give ownership back to the caller
|
* Remove the widget from the dock and give ownership back to the caller
|
||||||
*/
|
*/
|
||||||
void releaseWidget();
|
QWidget* takeWidget();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the widget for the dock widget. This function returns zero if
|
* Returns the widget for the dock widget. This function returns zero if
|
||||||
|
Loading…
Reference in New Issue
Block a user