Results 1 to 7 of 7

Thread: QGraphicsTextItem doesn't show up

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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: QGraphicsTextItem doesn't show up

    after you have added the item call setSceneRect() with QGraphicsScene::itemsBoundingRect(), then you should scroll to each item.

    EDIT: It it is maybe hidden by another item? Try to "play" with the z value of the item.

  2. #2
    Join Date
    Apr 2010
    Posts
    11
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsTextItem doesn't show up

    Thanks, Lykurg. I tried calling QGraphicsScene::itemsBoundingRect() and QGraphicsScene::sceneRect() where there is only an QGraphicsTextItem added to the scene. It turned out that the items bounding rect is much larger than the scene rect. That is why the text item is not shown on the scene.

    I do not know why the default QGraphicsTextItem has such larger bounding rect. How can I make it smaller to fit within the scene rect?

Similar Threads

  1. QCalenderWidget doesn't show the month name and Day name.
    By jthacker in forum Qt Programming
    Replies: 2
    Last Post: 28th April 2010, 20:43
  2. Application running but doesn't show up!!!
    By joandelason in forum Newbie
    Replies: 4
    Last Post: 21st March 2010, 09:37
  3. QGraphicsTextItem: How to show the text cursor?
    By breezeight in forum Qt Programming
    Replies: 1
    Last Post: 17th November 2009, 16:44
  4. Replies: 0
    Last Post: 13th February 2009, 15:17
  5. QSystemTrayIcon doesn't show icon ?
    By probine in forum Qt Programming
    Replies: 3
    Last Post: 25th January 2007, 19:17

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
  •  
Qt is a trademark of The Qt Company.