Results 1 to 1 of 1

Thread: QGraphicsGridLayout problem with positioning

  1. #1
    Join Date
    Feb 2013
    Location
    India
    Posts
    153
    Thanks
    27
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    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 :

    [code]
    +-----------------------------------------------+
    | | |
    | 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....

    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 15:26.

Similar Threads

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

Tags for this Thread

Bookmarks

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.