call addOffscreenWidget(widget) before actually embedding the widget in setGraphicsWidget(widget)
svn path=/trunk/KDE/kdelibs/; revision=1158454
This commit is contained in:
parent
24e9370b7d
commit
2d190922f6
@ -656,6 +656,11 @@ void Dialog::setGraphicsWidget(QGraphicsWidget *widget)
|
||||
d->graphicsWidgetPtr = widget;
|
||||
|
||||
if (widget) {
|
||||
Plasma::Corona *c = qobject_cast<Plasma::Corona *>(widget->scene());
|
||||
if (c) {
|
||||
c->addOffscreenWidget(widget);
|
||||
}
|
||||
|
||||
if (!layout()) {
|
||||
QVBoxLayout *lay = new QVBoxLayout(this);
|
||||
lay->setMargin(0);
|
||||
|
4
dialog.h
4
dialog.h
@ -77,10 +77,6 @@ class PLASMA_EXPORT Dialog : public QWidget
|
||||
* Sets a QGraphicsWidget to be shown as the content in this dialog.
|
||||
* The dialog will then set up a QGraphicsView and coordinate geometry with
|
||||
* the widget automatically.
|
||||
* The widget must be in the scene and not child of a movable
|
||||
* widget such as an Applet. It is advised to call
|
||||
* Corona::addOffScreenWidget(widget) prior to call this function that
|
||||
* will take care of this issue.
|
||||
*
|
||||
* @arg widget the QGraphicsWidget to display in this dialog
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user