From 76a0ea27dd4e377ab5d32c7559f4b9700cd5618a Mon Sep 17 00:00:00 2001 From: Artur Duque de Souza Date: Fri, 6 Nov 2009 19:01:09 -0300 Subject: Make sizePolicy a property of QGraphicsWidget too The widget has sizePolicy as a property and declaring that properly helps scripting. Just as it was done with min/pref/max sizes. Signed-off-by: Artur Duque de Souza --- src/gui/graphicsview/qgraphicswidget.cpp | 6 ++++++ src/gui/graphicsview/qgraphicswidget.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp index 35a3c13..1496798 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -318,6 +318,12 @@ void QGraphicsWidget::resize(const QSizeF &size) */ /*! + \property QGraphicsWidget::sizePolicy + \brief the size policy for the widget + \sa sizePolicy(), setSizePolicy(), QWidget::sizePolicy() +*/ + +/*! \property QGraphicsWidget::geometry \brief the geometry of the widget diff --git a/src/gui/graphicsview/qgraphicswidget.h b/src/gui/graphicsview/qgraphicswidget.h index 38f72f0..15dc878 100644 --- a/src/gui/graphicsview/qgraphicswidget.h +++ b/src/gui/graphicsview/qgraphicswidget.h @@ -77,6 +77,7 @@ class Q_GUI_EXPORT QGraphicsWidget : public QGraphicsObject, public QGraphicsLay Q_PROPERTY(QSizeF minimumSize READ minimumSize WRITE setMinimumSize) Q_PROPERTY(QSizeF preferredSize READ preferredSize WRITE setPreferredSize) Q_PROPERTY(QSizeF maximumSize READ maximumSize WRITE setMaximumSize) + Q_PROPERTY(QSizePolicy::Policy sizePolicy READ sizePolicy WRITE setSizePolicy) Q_PROPERTY(Qt::FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy) Q_PROPERTY(Qt::WindowFlags windowFlags READ windowFlags WRITE setWindowFlags) Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle) -- cgit v0.12