Results 1 to 3 of 3

Thread: Positinoning in GraphicsScene without using GraphicsItem

  1. #1
    Join Date
    Jan 2008
    Location
    Finland /Pakistan
    Posts
    216
    Thanks
    20
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Positinoning in GraphicsScene without using GraphicsItem

    Hi,
    I have added two text in my scene by using command addText();but both the text overlap each other,can anyone tell me a way that i can somehow change the position of text without being making things as item and using its setPos() function...
    is there any way to avoid the making of my own item ???..Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Positinoning in GraphicsScene without using GraphicsItem

    But those "text objects" are items Take a look at QGraphicsTextItem, that's exactly what gets added to the scene with QGraphicsScene::addText() (see what the method returns), so you can use setPos() on the resulting item.

  3. #3
    Join Date
    Jan 2008
    Location
    Finland /Pakistan
    Posts
    216
    Thanks
    20
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Positinoning in GraphicsScene without using GraphicsItem

    Thanks Wyosta....but later i would be banging some more questions on it ...Thanks and Keep up the good work !!!...

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.