Results 1 to 3 of 3

Thread: Need some doc or help about widgets positions (coordinates)

  1. #1
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Need some doc or help about widgets positions (coordinates)

    Hi, i've added a QListWidget to a QGraphicsScene, all is ok, but i'm confused about the coordinates.
    I thought that x=0, y=0 was first top-left pixel, but if i do: QListWidget->move(0,0), its move to about 40 pixels from top and about 40 pixels from left, i'm really confused about this.
    I've tryed to find some doc about positions or something but no luck for now.
    Somebody could help me with a link or something?
    Thanks

  2. #2
    Join Date
    Jan 2012
    Location
    Dortmund, Germany
    Posts
    159
    Thanks
    69
    Thanked 10 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Need some doc or help about widgets positions (coordinates)

    The QGraphicsScene has a coordinate system of it's own, so has the QGraphicsView. You can translate between the systems (global, vieweport, scene) by using the ->mapFrom... and ->mapTo... methods of view or scene.

    Furthermore, the scene is just some virtual model where you can place things on. To see it, you use the view - and the latter can show whatever part of the scene you choose.

    As I am still struggling with my own problems regarding scene geometry and centering I don't try to be more specific than I think I can sensibly be - if this doesn't help, the experts here might be a source of deeper wisdom :-)

  3. #3
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Need some doc or help about widgets positions (coordinates)

    thanks!! thath helped a lot

Similar Threads

  1. QAbstractScrollArea scrollbar positions
    By ugluk in forum Qt Programming
    Replies: 5
    Last Post: 13th September 2011, 08:44
  2. Positions at Noida, India
    By nish in forum Jobs
    Replies: 0
    Last Post: 24th February 2011, 13:58
  3. Replies: 4
    Last Post: 18th March 2010, 10:11
  4. Replies: 3
    Last Post: 26th November 2007, 08:18

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.