PDA

View Full Version : QGraphicsGridLayout problem with positioning



karankumar1609
12th July 2013, 14:26
Hello Everyone,

I am new to QGraphicsGridLayout with GraphicsView/Scene.
I am using QGraphicsGridLayout to place my items in it.

what i actually want is :



+-----------------------------------------------+
| | |
| EMPTY | ITEM |
| | |
+-----------------------------------------------+
| |
| ITEM WITH 2 COL SPAN |
| |
+-----------------------------------------------+
[code]

first position of grid should be empty... but i dont know how to make it possible..
many hit and trials but still no solution :(

Anyone have idea how to do that?

Added after 45 minutes:

OOPS.. i got it....

[code]
QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical, &widget);
QGraphicsWidget *spacer = new QGraphicsWidget;
layout->addItem(spacer);


UHHH... Do not ever left an entity blank... :)