QGraphicsProxyWidget Class Reference |
QWidget state | QGraphicsProxyWidget state | Notes |
---|---|---|
QWidget::enabled | QGraphicsProxyWidget::enabled | |
QWidget::visible | QGraphicsProxyWidget::visible | The explicit state is also symmetric. |
QWidget::geometry | QGraphicsProxyWidget::geometry | Geometry is only guaranteed to be symmetric while the embedded widget is visible. |
QWidget::layoutDirection | QGraphicsProxyWidget::layoutDirection | |
QWidget::style | QGraphicsProxyWidget::style | |
QWidget::palette | QGraphicsProxyWidget::palette | |
QWidget::font | QGraphicsProxyWidget::font | |
QWidget::cursor | QGraphicsProxyWidget::cursor | The embedded widget overrides the proxy widget cursor. The proxy cursor changes depending on which embedded subwidget is currently under the mouse. |
QWidget::sizeHint() | QGraphicsProxyWidget::sizeHint() | All size hint functionality from the embedded widget is forwarded by the proxy. |
QWidget::getContentsMargins() | QGraphicsProxyWidget::getContentsMargins() | Updated once by setWidget(). |
QWidget::windowTitle | QGraphicsProxyWidget::windowTitle | Updated once by setWidget(). |
Note: QGraphicsScene keeps the embedded widget in a special state that prevents it from disturbing other widgets (both embedded and not embedded) while the widget is embedded. In this state, the widget may differ slightly in behavior from when it is not embedded.
Warning: This class is provided for convenience when bridging QWidgets and QGraphicsItems, it should not be used for high-performance scenarios.
See also QGraphicsScene::addWidget() and QGraphicsWidget.
Constructs a new QGraphicsProxy widget. parent and wFlags are passed to QGraphicsItem's constructor.
Destroys the proxy widget and any embedded widget.
Creates a proxy widget for the given child of the widget contained in this proxy.
This function makes it possible to aquire proxies for non top-level widgets. For instance, you can embed a dialog, and then transform only one of its widgets.
If the widget is already embedded, return the existing proxy widget.
This function was introduced in Qt 4.5.
See also newProxyWidget() and QGraphicsScene::addWidget().
Creates a proxy widget for the given child of the widget contained in this proxy.
You should not call this function directly; use QGraphicsProxyWidget::createProxyForChildWidget() instead.
This function is a fake virtual slot that you can reimplement in your subclass in order to control how new proxy widgets are created. The default implementation returns a proxy created with the QGraphicsProxyWidget() constructor with this proxy widget as the parent.
This function was introduced in Qt 4.5.
See also createProxyForChildWidget().
Embeds widget into this proxy widget. The embedded widget must reside exclusively either inside or outside of Graphics View. You cannot embed a widget as long as it is is visible elsewhere in the UI, at the same time.
widget must be a top-level widget whose parent is 0.
When the widget is embedded, its state (e.g., visible, enabled, geometry, size hints) is copied into the proxy widget. If the embedded widget is explicitly hidden or disabled, the proxy widget will become explicitly hidden or disabled after embedding is complete. The class documentation has a full overview over the shared state.
After this function returns, QGraphicsProxyWidget will keep its state synchronized with that of widget whenever possible.
If a widget is already embedded by this proxy when this function is called, that widget will first be automatically unembedded. Passing 0 for the widget argument will only unembed the widget, and the ownership of the currently embedded widget will be passed on to the caller. Every child widget that are embedded will also be embedded and their proxy widget destroyed.
Note that widgets with the Qt::WA_PaintOnScreen widget attribute set and widgets that wrap an external application or controller cannot be embedded. Examples are QGLWidget and QAxWidget.
See also widget().
Returns the rectangle for widget, which must be a descendant of widget(), or widget() itself, in this proxy item's local coordinates.
If no widget is embedded, widget is 0, or widget is not a descendant of the embedded widget, this function returns an empty QRectF.
See also widget().
Returns a pointer to the embedded widget.
See also setWidget().
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.5 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com