diff --git a/src/declarative/graphicsitems/qdeclarativeanchors.cpp b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
index c96ca0e..02473cb 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
@@ -181,10 +181,12 @@ void QDeclarativeAnchorsPrivate::fillChanged()
     if (updatingFill < 2) {
         ++updatingFill;
 
+        qreal horMargin = isMirrored() ? rightMargin : leftMargin;
+
         if (fill == item->parentItem()) {                         //child-parent
-            setItemPos(QPointF(leftMargin, topMargin));
+            setItemPos(QPointF(horMargin, topMargin));
         } else if (fill->parentItem() == item->parentItem()) {   //siblings
-            setItemPos(QPointF(fill->x()+leftMargin, fill->y()+topMargin));
+            setItemPos(QPointF(fill->x()+horMargin, fill->y()+topMargin));
         }
         QGraphicsItemPrivate *fillPrivate = QGraphicsItemPrivate::get(fill);
         setItemSize(QSizeF(fillPrivate->width()-leftMargin-rightMargin, fillPrivate->height()-topMargin-bottomMargin));
@@ -204,13 +206,19 @@ void QDeclarativeAnchorsPrivate::centerInChanged()
 
     if (updatingCenterIn < 2) {
         ++updatingCenterIn;
+
+        qreal effectiveHCenterOffset( hCenterOffset );
+        if (isMirrored()) {
+            effectiveHCenterOffset *= -1.0;
+        }
+
         if (centerIn == item->parentItem()) {
-            QPointF p(hcenter(item->parentItem()) - hcenter(item) + hCenterOffset,
+            QPointF p(hcenter(item->parentItem()) - hcenter(item) + effectiveHCenterOffset,
                       vcenter(item->parentItem()) - vcenter(item) + vCenterOffset);
             setItemPos(p);
 
         } else if (centerIn->parentItem() == item->parentItem()) {
-            QPointF p(centerIn->x() + hcenter(centerIn) - hcenter(item) + hCenterOffset,
+            QPointF p(centerIn->x() + hcenter(centerIn) - hcenter(item) + effectiveHCenterOffset,
                       centerIn->y() + vcenter(centerIn) - vcenter(item) + vCenterOffset);
             setItemPos(p);
         }
@@ -498,6 +506,12 @@ bool QDeclarativeAnchorsPrivate::calcStretch(const QDeclarativeAnchorLine &edge1
     return invalid;
 }
 
+bool QDeclarativeAnchorsPrivate::isMirrored() const
+{
+    return (item->parentItem() &&
+        static_cast<QDeclarativeItem *>(item->parentItem())->layoutDirection() == QDeclarativeItem::RightToLeft);
+}
+
 void QDeclarativeAnchorsPrivate::updateVerticalAnchors()
 {
     if (fill || centerIn || !isItemComplete())
@@ -575,57 +589,126 @@ void QDeclarativeAnchorsPrivate::updateHorizontalAnchors()
     if (fill || centerIn || !isItemComplete())
         return;
 
-    if (updatingHorizontalAnchor < 2) {
+    if (updatingHorizontalAnchor < 3) {
         ++updatingHorizontalAnchor;
-        QGraphicsItemPrivate *itemPrivate = QGraphicsItemPrivate::get(item);
-        if (usedAnchors & QDeclarativeAnchors::LeftAnchor) {
-            //Handle stretching
-            bool invalid = true;
+        isMirrored() ? updateHorizontalAnchorsRTL() : updateHorizontalAnchorsLTR();
+        --updatingHorizontalAnchor;
+    } else {
+        // ### Make this certain :)
+        qmlInfo(item) << QDeclarativeAnchors::tr("Possible anchor loop detected on horizontal anchor.");
+    }
+}
+
+void QDeclarativeAnchorsPrivate::updateHorizontalAnchorsLTR()
+{
+    QGraphicsItemPrivate *itemPrivate = QGraphicsItemPrivate::get(item);
+    if (usedAnchors & QDeclarativeAnchors::LeftAnchor) {
+        //Handle stretching
+        bool invalid = true;
+        qreal width = 0.0;
+        if (usedAnchors & QDeclarativeAnchors::RightAnchor) {
+            invalid = calcStretch(left, right, leftMargin, -rightMargin, QDeclarativeAnchorLine::Left, width);
+        } else if (usedAnchors & QDeclarativeAnchors::HCenterAnchor) {
+            invalid = calcStretch(left, hCenter, leftMargin, hCenterOffset, QDeclarativeAnchorLine::Left, width);
+            width *= 2;
+        }
+        if (!invalid)
+            setItemWidth(width);
+
+        //Handle left
+        if (left.item == item->parentItem()) {
+            setItemX(adjustedPosition(left.item, left.anchorLine) + leftMargin);
+        } else if (left.item->parentItem() == item->parentItem()) {
+            setItemX(position(left.item, left.anchorLine) + leftMargin);
+        }
+    } else if (usedAnchors & QDeclarativeAnchors::RightAnchor) {
+        //Handle stretching (left + right case is handled in updateLeftAnchor)
+        if (usedAnchors & QDeclarativeAnchors::HCenterAnchor) {
             qreal width = 0.0;
-            if (usedAnchors & QDeclarativeAnchors::RightAnchor) {
-                invalid = calcStretch(left, right, leftMargin, -rightMargin, QDeclarativeAnchorLine::Left, width);
-            } else if (usedAnchors & QDeclarativeAnchors::HCenterAnchor) {
-                invalid = calcStretch(left, hCenter, leftMargin, hCenterOffset, QDeclarativeAnchorLine::Left, width);
-                width *= 2;
-            }
+            bool invalid = calcStretch(hCenter, right, hCenterOffset, -rightMargin,
+                                          QDeclarativeAnchorLine::Left, width);
             if (!invalid)
-                setItemWidth(width);
+                setItemWidth(width*2);
+        }
 
-            //Handle left
-            if (left.item == item->parentItem()) {
-                setItemX(adjustedPosition(left.item, left.anchorLine) + leftMargin);
-            } else if (left.item->parentItem() == item->parentItem()) {
-                setItemX(position(left.item, left.anchorLine) + leftMargin);
-            }
-        } else if (usedAnchors & QDeclarativeAnchors::RightAnchor) {
-            //Handle stretching (left + right case is handled in updateLeftAnchor)
-            if (usedAnchors & QDeclarativeAnchors::HCenterAnchor) {
-                qreal width = 0.0;
-                bool invalid = calcStretch(hCenter, right, hCenterOffset, -rightMargin,
-                                              QDeclarativeAnchorLine::Left, width);
-                if (!invalid)
-                    setItemWidth(width*2);
-            }
+        //Handle right
+        if (right.item == item->parentItem()) {
+            setItemX(adjustedPosition(right.item, right.anchorLine) - itemPrivate->width() - rightMargin);
+        } else if (right.item->parentItem() == item->parentItem()) {
+            setItemX(position(right.item, right.anchorLine) - itemPrivate->width() - rightMargin);
+        }
+    } else if (usedAnchors & QDeclarativeAnchors::HCenterAnchor) {
+        //Handle hCenter
+        if (hCenter.item == item->parentItem()) {
+            setItemX(adjustedPosition(hCenter.item, hCenter.anchorLine) - hcenter(item) + hCenterOffset);
+        } else if (hCenter.item->parentItem() == item->parentItem()) {
+            setItemX(position(hCenter.item, hCenter.anchorLine) - hcenter(item) + hCenterOffset);
+        }
+    }
+}
 
-            //Handle right
-            if (right.item == item->parentItem()) {
-                setItemX(adjustedPosition(right.item, right.anchorLine) - itemPrivate->width() - rightMargin);
-            } else if (right.item->parentItem() == item->parentItem()) {
-                setItemX(position(right.item, right.anchorLine) - itemPrivate->width() - rightMargin);
-            }
+QDeclarativeAnchorLine::AnchorLine reversedAnchorLine(QDeclarativeAnchorLine::AnchorLine al) {
+    if (al == QDeclarativeAnchorLine::Left) {
+        return QDeclarativeAnchorLine::Right;
+    } else if (al == QDeclarativeAnchorLine::Right) {
+        return QDeclarativeAnchorLine::Left;
+    } else {
+        return al;
+    }
+}
+
+void QDeclarativeAnchorsPrivate::updateHorizontalAnchorsRTL()
+{
+    QDeclarativeAnchorLine leftR, rightR, hCenterR;
+    leftR.item = right.item;
+    leftR.anchorLine = reversedAnchorLine(right.anchorLine);
+    rightR.item = left.item;
+    rightR.anchorLine = reversedAnchorLine(left.anchorLine);
+    hCenterR.item = hCenter.item;
+    hCenterR.anchorLine = reversedAnchorLine(hCenter.anchorLine);
+
+    QGraphicsItemPrivate *itemPrivate = QGraphicsItemPrivate::get(item);
+    if (usedAnchors & QDeclarativeAnchors::RightAnchor) { // This is actually rerversed left!
+        //Handle stretching
+        bool invalid = true;
+        qreal width = 0.0;
+        if (usedAnchors & QDeclarativeAnchors::LeftAnchor) {
+            invalid = calcStretch(leftR, rightR, rightMargin, -leftMargin, QDeclarativeAnchorLine::Left, width);
         } else if (usedAnchors & QDeclarativeAnchors::HCenterAnchor) {
-            //Handle hCenter
-            if (hCenter.item == item->parentItem()) {
-                setItemX(adjustedPosition(hCenter.item, hCenter.anchorLine) - hcenter(item) + hCenterOffset);
-            } else if (hCenter.item->parentItem() == item->parentItem()) {
-                setItemX(position(hCenter.item, hCenter.anchorLine) - hcenter(item) + hCenterOffset);
-            }
+            invalid = calcStretch(leftR, hCenterR, rightMargin, -hCenterOffset, QDeclarativeAnchorLine::Left, width);
+            width *= 2;
+        }
+        if (!invalid)
+            setItemWidth(width);
+
+        //Handle left
+        if (leftR.item == item->parentItem()) {
+            setItemX(adjustedPosition(leftR.item, leftR.anchorLine) + rightMargin);
+        } else if (leftR.item->parentItem() == item->parentItem()) {
+            setItemX(position(leftR.item, leftR.anchorLine) + rightMargin);
+        }
+    } else if (usedAnchors & QDeclarativeAnchors::LeftAnchor) { // This is actually rerversed right!
+        //Handle stretching (left + right case is handled in updateLeftAnchor)
+        if (usedAnchors & QDeclarativeAnchors::HCenterAnchor) {
+            qreal width = 0.0;
+            bool invalid = calcStretch(hCenterR, rightR, -hCenterOffset, -leftMargin, QDeclarativeAnchorLine::Left, width);
+            if (!invalid)
+                setItemWidth(width*2);
         }
 
-        --updatingHorizontalAnchor;
-    } else {
-        // ### Make this certain :)
-        qmlInfo(item) << QDeclarativeAnchors::tr("Possible anchor loop detected on horizontal anchor.");
+        //Handle right
+        if (rightR.item == item->parentItem()) {
+            setItemX(adjustedPosition(rightR.item, rightR.anchorLine) - itemPrivate->width() - leftMargin);
+        } else if (rightR.item->parentItem() == item->parentItem()) {
+            setItemX(position(rightR.item, rightR.anchorLine) - itemPrivate->width() - leftMargin);
+        }
+    } else if (usedAnchors & QDeclarativeAnchors::HCenterAnchor) {
+        //Handle hCenter
+        if (hCenterR.item == item->parentItem()) {
+            setItemX(adjustedPosition(hCenterR.item, hCenterR.anchorLine) - hcenter(item) - hCenterOffset);
+        } else if (hCenterR.item->parentItem() == item->parentItem()) {
+            setItemX(position(hCenterR.item, hCenterR.anchorLine) - hcenter(item) - hCenterOffset);
+        }
     }
 }
 
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors_p.h b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
index 8223b17..d4cc8c2 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
@@ -184,6 +184,7 @@ Q_SIGNALS:
 
 private:
     friend class QDeclarativeItem;
+    friend class QDeclarativeItemPrivate;
     friend class QDeclarativeGraphicsWidget;
     Q_DISABLE_COPY(QDeclarativeAnchors)
     Q_DECLARE_PRIVATE(QDeclarativeAnchors)
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h b/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h
index 1bbea36..55ff1b4 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeanchors_p_p.h
@@ -133,7 +133,10 @@ public:
     bool checkVAnchorValid(QDeclarativeAnchorLine anchor) const;
     bool calcStretch(const QDeclarativeAnchorLine &edge1, const QDeclarativeAnchorLine &edge2, qreal offset1, qreal offset2, QDeclarativeAnchorLine::AnchorLine line, qreal &stretch);
 
+    bool isMirrored() const;
     void updateHorizontalAnchors();
+    void updateHorizontalAnchorsLTR();
+    void updateHorizontalAnchorsRTL();
     void updateVerticalAnchors();
     void fillChanged();
     void centerInChanged();
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index e0df751..9d293fc 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -2858,6 +2858,80 @@ void QDeclarativeItemPrivate::transformChanged()
     }
 }
 
+QDeclarativeItem::LayoutDirection QDeclarativeItem::layoutDirection() const
+{
+    Q_D(const QDeclarativeItem);
+    return d->effectiveLayoutDir;
+}
+
+void QDeclarativeItem::setLayoutDirection(LayoutDirection direction)
+{
+    Q_D(QDeclarativeItem);
+    if (d->layoutDir != direction) {
+        d->layoutDir = direction;
+        d->setLayoutDirection_helper(direction);
+
+        /*
+        for(int ii = 0; ii < d->changeListeners.count(); ++ii) {
+            const QDeclarativeItemPrivate::ChangeListener &change = d->changeListeners.at(ii);
+            if (change.types & QDeclarativeItemPrivate::Geometry) {
+                QDeclarativeAnchorsPrivate *anchor = change.listener->anchorPrivate();
+                if (anchor)
+                    anchor->updateHorizontalAnchors();
+            }
+        }
+        */
+    }
+}
+
+void QDeclarativeItem::unsetLayoutDirection()
+{
+    Q_D(QDeclarativeItem);
+    if (d->layoutDir != QDeclarativeItem::Automatic) {
+        d->layoutDir = QDeclarativeItem::Automatic;
+        d->resolveLayoutDirection();
+    }
+}
+
+void QDeclarativeItemPrivate::setLayoutDirection_helper(QDeclarativeItem::LayoutDirection direction)
+{
+    Q_Q(QDeclarativeItem);
+    if (effectiveLayoutDir == direction)
+        return;
+    effectiveLayoutDir = direction;
+
+    for (int i = 0; i < children.count(); ++i) {
+        QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(children.at(i));
+        if (!child) //### Should this be ignoring non-QDeclarativeItem graphicsobjects?
+            continue;
+        QDeclarativeItemPrivate *childP = QDeclarativeItemPrivate::get(child);
+        if (childP->layoutDir == QDeclarativeItem::Automatic) {
+            childP->setLayoutDirection_helper(direction);
+        }
+    }
+
+    emit q->layoutDirectionChanged(direction);
+    if (_anchors) {
+        _anchors->d_func()->updateHorizontalAnchors();
+    }
+}
+
+void QDeclarativeItemPrivate::resolveLayoutDirection()
+{
+    Q_Q(QDeclarativeItem);
+    if (layoutDir != QDeclarativeItem::Automatic) {
+        return;
+    }
+    if (QDeclarativeItem *parentItem = q->parentItem()) {
+        setLayoutDirection_helper(parentItem->layoutDirection());
+    } else {
+        //Check from locale?
+        //setLayoutDirection_helper(QApplication::layoutDirection());
+        setLayoutDirection_helper(QDeclarativeItem::LeftToRight);
+    }
+}
+
+
 /*!
     \property QDeclarativeItem::smooth
     \brief whether the item is smoothly transformed.
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h
index afb1f2e..0871f67 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem.h
@@ -90,9 +90,11 @@ class Q_DECLARATIVE_EXPORT QDeclarativeItem : public QGraphicsObject, public QDe
     Q_PROPERTY(bool activeFocus READ hasActiveFocus NOTIFY activeFocusChanged)
     Q_PROPERTY(QDeclarativeListProperty<QGraphicsTransform> transform READ transform DESIGNABLE false FINAL)
     Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin NOTIFY transformOriginChanged)
+    Q_PROPERTY(LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection RESET unsetLayoutDirection NOTIFY layoutDirectionChanged)
     Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint) // transformOriginPoint is read-only for Item
     Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged)
     Q_ENUMS(TransformOrigin)
+    Q_ENUMS(LayoutDirection)
     Q_CLASSINFO("DefaultProperty", "data")
 
 public:
@@ -102,6 +104,12 @@ public:
         BottomLeft, Bottom, BottomRight
     };
 
+    enum LayoutDirection {
+        LeftToRight,
+        RightToLeft,
+        Automatic
+    };
+
     QDeclarativeItem(QDeclarativeItem *parent = 0);
     virtual ~QDeclarativeItem();
 
@@ -133,6 +141,10 @@ public:
     TransformOrigin transformOrigin() const;
     void setTransformOrigin(TransformOrigin);
 
+    LayoutDirection layoutDirection() const;
+    void setLayoutDirection(LayoutDirection);
+    void unsetLayoutDirection();
+
     bool smooth() const;
     void setSmooth(bool);
 
@@ -159,6 +171,7 @@ Q_SIGNALS:
     void activeFocusChanged(bool);
     void parentChanged(QDeclarativeItem *);
     void transformOriginChanged(TransformOrigin);
+    void layoutDirectionChanged(LayoutDirection);
     void smoothChanged(bool);
     void clipChanged(bool);
 
diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h
index f85fa27..6170a53 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h
@@ -126,7 +126,8 @@ public:
       widthValid(false), heightValid(false),
       componentComplete(true), keepMouse(false),
       smooth(false), transformOriginDirty(true), doneEventPreHandler(false), keyHandler(0),
-      mWidth(0), mHeight(0), implicitWidth(0), implicitHeight(0)
+      mWidth(0), mHeight(0), implicitWidth(0), implicitHeight(0),
+      layoutDir(QDeclarativeItem::Automatic), effectiveLayoutDir(QDeclarativeItem::LeftToRight)
     {
         QGraphicsItemPrivate::acceptedMouseButtons = 0;
         isDeclarativeItem = 1;
@@ -146,6 +147,7 @@ public:
         }
         baselineOffset.invalidate();
         mouseSetsFocus = false;
+        resolveLayoutDirection();
     }
 
     // Private Properties
@@ -322,6 +324,12 @@ public:
     static void start(QElapsedTimer &);
     static qint64 elapsed(QElapsedTimer &);
     static qint64 restart(QElapsedTimer &);
+
+
+    QDeclarativeItem::LayoutDirection layoutDir:4;
+    QDeclarativeItem::LayoutDirection effectiveLayoutDir:4;
+    void setLayoutDirection_helper(QDeclarativeItem::LayoutDirection direction);
+    void resolveLayoutDirection();
 };
 
 /*
