Results 1 to 3 of 3

Thread: QLayout on scenes

  1. #1
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QLayout on scenes

    I have a bunch of QGraphicsRectItem and i want to manage them on a QGraphicsScene like what QGridLayout does to widgets.

    I looked at QGraphicsGridLayout but this would like to reside on a QGraphicsWidget somehow. I want a layout kinda things that will reside on the scene.

    What are my other options? All i want is to arrange a QGraphicsItems( RectItem) in grids ..

    baray98

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QLayout on scenes

    If it is just once u want to layout the items,.,,, u can set the position manually using loops...
    it wont be a much a burden i guess

  3. #3
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QLayout on scenes

    Well, i think its doable but a little tedious since my number and sizes of my rects are variable , its all dependent on some files....

    The best way that i could think of is that I will make a class that acts like a QGridLayout that resides on QGraphicsScene ( hoping i am not re-inventing the wheel).

    Anymore opinion from the gurus..

    baray98

Similar Threads

  1. QLayout on hidden window
    By benacler in forum Qt Programming
    Replies: 0
    Last Post: 2nd September 2008, 18:04
  2. QLayout update size signal
    By bunjee in forum Qt Programming
    Replies: 3
    Last Post: 6th June 2008, 11:24
  3. custom QLayout help
    By Micawber in forum Qt Programming
    Replies: 2
    Last Post: 19th October 2007, 21:44
  4. Remove a QLayout from QGridLayout
    By grosem in forum Qt Programming
    Replies: 18
    Last Post: 2nd January 2007, 11:19
  5. QLayout
    By sudeepdua in forum Qt Programming
    Replies: 2
    Last Post: 21st November 2006, 10:46

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.