Results 1 to 4 of 4

Thread: how blocked center in QGraphicsScene

  1. #1
    Join Date
    Jun 2009
    Posts
    25
    Thanks
    1

    Default how blocked center in QGraphicsScene

    hello,
    for example I have QGraphicsScene size 500x500. I put line on cords: from (10,30) to (70,70) and i have no idea why line is on center of the scene, could you explain me why? Do you know how to off the "center" option?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: how blocked center in QGraphicsScene

    its the default behavior. Use QGraphicsView::setAlignment() to change that.

  3. #3
    Join Date
    Jun 2009
    Posts
    25
    Thanks
    1

    Default Re: how blocked center in QGraphicsScene

    So there is no way to put the line exactly on coords from (10,30) to (70,70)? not alignt to center, not align to left but exactly from (10,30) to (70,70)

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: how blocked center in QGraphicsScene

    there is, as I have written! Just align the sceen via QGraphicsView::setAlignment() to the top left of your view and then when you draw the line from (10,30) to (70,70) it is displayed from (10,30) to (70,70).

Similar Threads

  1. Hello Qt Center
    By Achraf-BH in forum General Discussion
    Replies: 0
    Last Post: 24th November 2009, 09:28
  2. Show in center
    By lisa in forum Qt Programming
    Replies: 3
    Last Post: 22nd November 2009, 11:42
  3. GUI thread blocked using QThread.
    By summer_of_69 in forum Qt Programming
    Replies: 11
    Last Post: 18th May 2009, 09:43
  4. QThread event loop seems blocked
    By eurodatar in forum Qt Programming
    Replies: 3
    Last Post: 6th May 2009, 16:50
  5. Replies: 1
    Last Post: 24th February 2009, 18:35

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.