[Qt-interest] Isometric projection with QGraphicsView

Jesus Fernandez jsfdez at gmail.com
Sun Jul 31 12:46:11 CEST 2011


Hi,

I have this code:

void Grid::init()

{

    QRectF rect;

    QRect square(0, 0, 26, 26);

     rotate(30);

    scale(1, 0.5);

     rect = this->rect();

    for(int i = 0; i < 10; i++)

    {

        QGraphicsRectItem *rect = new QGraphicsRectItem(

                    square.translated(i * square.width(), 0),

                    this);

    }

}


I am trying to get this code work and show in screen a grid in a
isometric view. After searching in Internet I cannot figure how can
get it working.


Is there any error in the operations?


Best regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110731/f7bb74d5/attachment.html 


More information about the Qt-interest-old mailing list