Results 1 to 3 of 3

Thread: QTextLayout draws text outside the widget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2009
    Posts
    17
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default QTextLayout draws text outside the widget

    Hi all,

    Working on simple CAD application using QGraphicsView/QGraphicsScene, I'm trying to implement a 'text entity' derived from QGraphicsItem. (something like the QGraphicsSimpleTextItem).
    Inside this item I'm using the QTextLayout::draw() to draw the text. And this is the problem. The text is drawn also outside the view widget (QGraphicsView) as shows the attached image.

    Has anybody an idea how to solve this? I can also post a code ...
    Thans a lot

    Tomas
    Attached Images Attached Images

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  3. ‎a lightweight text showing widget
    By jacum in forum Qt Programming
    Replies: 1
    Last Post: 22nd August 2007, 14:44
  4. Editable text in QGraphicsView
    By wysota in forum Qt Programming
    Replies: 8
    Last Post: 24th February 2007, 15:30
  5. widget for text AND buttons
    By nongentesimus in forum Newbie
    Replies: 2
    Last Post: 16th June 2006, 13:43

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.