From 8a215a3169a67ba0a4bf59b39f2b17cb3e80033f Mon Sep 17 00:00:00 2001 From: xavier Date: Sun, 25 Apr 2010 17:34:46 +0000 Subject: [PATCH] Correction pour permettre la compilation avec Qt < 4.6.x git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@972 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/diagramtextitem.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sources/diagramtextitem.cpp b/sources/diagramtextitem.cpp index 536e8369a..0699b1ec3 100644 --- a/sources/diagramtextitem.cpp +++ b/sources/diagramtextitem.cpp @@ -33,7 +33,10 @@ DiagramTextItem::DiagramTextItem(QGraphicsItem *parent, Diagram *parent_diagram) { setDefaultTextColor(Qt::black); setFont(QETApp::diagramTextsFont()); - setFlags(QGraphicsItem::ItemIsSelectable|QGraphicsItem::ItemIsMovable|QGraphicsItem::ItemSendsGeometryChanges); + setFlags(QGraphicsItem::ItemIsSelectable|QGraphicsItem::ItemIsMovable); +#if QT_VERSION >= 0x040600 + setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); +#endif connect(this, SIGNAL(lostFocus()), this, SLOT(setNonFocusable())); } @@ -51,7 +54,10 @@ DiagramTextItem::DiagramTextItem(const QString &text, QGraphicsItem *parent, Dia { setDefaultTextColor(Qt::black); setFont(QETApp::diagramTextsFont()); - setFlags(QGraphicsItem::ItemIsSelectable|QGraphicsItem::ItemIsMovable|QGraphicsItem::ItemSendsGeometryChanges); + setFlags(QGraphicsItem::ItemIsSelectable|QGraphicsItem::ItemIsMovable); +#if QT_VERSION >= 0x040600 + setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); +#endif connect(this, SIGNAL(lostFocus()), this, SLOT(setNonFocusable())); }