Results 1 to 2 of 2

Thread: QRectF and drawText

  1. #1
    Join Date
    May 2006
    Posts
    3
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default QRectF and drawText

    Hi
    I was verry happy with Qt4 and it's posibilities to draw floats.
    I have a widget where I'm painting coordinates that can be verry small so that the width of the bounding rect can be smaller that 1.0
    But this has given me a fev problems.
    First:
    Drawing lines with a width of 2-3 pixels. if I set the width to 2 it covers the whole widget. The default is width = 0 and this makes the line 1 pixel wide.
    Second and related:
    If I draw text the text has a size of for example 8pt and this makes it cover the whole widget again. I want it to be 8 pixels in height.

    thanks in advance for you answers.'

    regards Andreas

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QRectF and drawText

    QPainter::setWindow() might help you.

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.