Results 1 to 1 of 1

Thread: QGraphicsGridLayout problem with positioning

  1. #1
    Join Date
    Feb 2013
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Lightbulb Re: QGraphicsGridLayout problem with positioning

    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 |
    | | |
    | |
    | |

    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....

    Qt Code:
    1. QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical, &widget);
    2. QGraphicsWidget *spacer = new QGraphicsWidget;
    3. layout->addItem(spacer);
    To copy to clipboard, switch view to plain text mode 

    UHHH... Do not ever left an entity blank...
    Last edited by karankumar1609; 12th July 2013 at 14:26.

Similar Threads

  1. Positioning problem, anchors not allowed
    By kornicameister in forum Qt Quick
    Replies: 0
    Last Post: 26th August 2011, 09:35
  2. Layout positioning problem.
    By Tomasz in forum Newbie
    Replies: 1
    Last Post: 14th September 2010, 09:42
  3. QGraphicsRectItem positioning problem
    By gufeatza in forum Qt Programming
    Replies: 3
    Last Post: 5th September 2009, 00:24
  4. QWidget positioning problem
    By St@n in forum Qt Programming
    Replies: 7
    Last Post: 30th June 2009, 06:56
  5. problem in positioning item in QGraphicsScene()
    By wagmare in forum Qt Programming
    Replies: 4
    Last Post: 8th May 2009, 06:41

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.