diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2010-03-31 00:19:42 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2010-03-31 00:19:42 (GMT) |
commit | ebd1c45822aca087be994c898cfb01cd41599429 (patch) | |
tree | 69b3cb95493ae28bf0a4fcb84bc2560c50b36759 /src/gui/graphicsview | |
parent | 4e4c0055d59978850796ff8c1b5015e17459e8d2 (diff) | |
download | Qt-ebd1c45822aca087be994c898cfb01cd41599429.zip Qt-ebd1c45822aca087be994c898cfb01cd41599429.tar.gz Qt-ebd1c45822aca087be994c898cfb01cd41599429.tar.bz2 |
Revert "Better handling for NOTIFY in QGraphicsWidget regarding geometry changes"
This reverts commit 13bccd4ade76dd8a9c1cc067cc2b8da69c11def2.
Conflicts:
src/gui/graphicsview/qgraphicswidget.cpp
Drop the support of QML on top of 4.6
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r-- | src/gui/graphicsview/qgraphicswidget.cpp | 3 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicswidget.h | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp index 131ee87..7be0096 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -392,7 +392,7 @@ void QGraphicsWidget::setGeometry(const QRectF &rect) } QSizeF oldSize = size(); QGraphicsLayoutItem::setGeometry(newGeom); - emit geometryChanged(); + // Send resize event bool resized = newGeom.size() != oldSize; if (resized) { @@ -403,6 +403,7 @@ void QGraphicsWidget::setGeometry(const QRectF &rect) emit widthChanged(); if (oldSize.height() != newGeom.size().height()) emit heightChanged(); + emit sizeChanged(); QApplication::sendEvent(this, &re); } } diff --git a/src/gui/graphicsview/qgraphicswidget.h b/src/gui/graphicsview/qgraphicswidget.h index 468a134..56b5f88 100644 --- a/src/gui/graphicsview/qgraphicswidget.h +++ b/src/gui/graphicsview/qgraphicswidget.h @@ -73,7 +73,7 @@ class Q_GUI_EXPORT QGraphicsWidget : public QGraphicsObject, public QGraphicsLay Q_PROPERTY(QPalette palette READ palette WRITE setPalette) Q_PROPERTY(QFont font READ font WRITE setFont) Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection RESET unsetLayoutDirection) - Q_PROPERTY(QSizeF size READ size WRITE resize NOTIFY geometryChanged) + Q_PROPERTY(QSizeF size READ size WRITE resize NOTIFY sizeChanged) Q_PROPERTY(QSizeF minimumSize READ minimumSize WRITE setMinimumSize) Q_PROPERTY(QSizeF preferredSize READ preferredSize WRITE setPreferredSize) Q_PROPERTY(QSizeF maximumSize READ maximumSize WRITE setMaximumSize) @@ -81,10 +81,11 @@ class Q_GUI_EXPORT QGraphicsWidget : public QGraphicsObject, public QGraphicsLay 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) - Q_PROPERTY(QRectF geometry READ geometry WRITE setGeometry NOTIFY geometryChanged) + Q_PROPERTY(QRectF geometry READ geometry WRITE setGeometry) public: QGraphicsWidget(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0); ~QGraphicsWidget(); + QGraphicsLayout *layout() const; void setLayout(QGraphicsLayout *layout); void adjustSize(); @@ -175,7 +176,7 @@ public: #endif Q_SIGNALS: - void geometryChanged(); + void sizeChanged(); public Q_SLOTS: bool close(); |