Results 1 to 5 of 5

Thread: Painter: transform coordinates but not pen width settings

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2006
    Location
    Kędzierzyn-Koźle
    Posts
    16
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default Re: Painter: transform coordinates but not pen width settings

    Hi I had the same problem ...
    Anybody that get here - you might use QPen::setCosmetic - that will obey all transformations and draw line with given width of pixels.
    If you are going to use it with different devices (ex. printer and screen) you might recalculate thickness regardles to device ppi or other metrics.

    This thread was very helpfull about this:
    http://lists.trolltech.com/qt-intere...ad00163-0.html

  2. #2
    Join Date
    Oct 2007
    Location
    India
    Posts
    162
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    20
    Thanked 6 Times in 5 Posts

    Default Re: Painter: transform coordinates but not pen width settings

    QPen::setCosmetic(true) works fine on all platforms except Mac. There are some issues on Mac and even after making the pen cosmetic, it's getting scaled. Check out this bug log too:

    https://bugreports.qt-project.org/browse/QTBUG-16303

Similar Threads

  1. Replies: 4
    Last Post: 18th March 2010, 10:11
  2. QToolBox width fixed to maximum content width
    By ghorwin in forum Qt Programming
    Replies: 0
    Last Post: 10th July 2009, 09:58
  3. Replies: 6
    Last Post: 14th April 2009, 17:40
  4. How to set QTableView width to width of horizontal header?
    By martinb0820 in forum Qt Programming
    Replies: 0
    Last Post: 2nd December 2008, 20:51
  5. Changing painter settings for QPixmap
    By spagatoni in forum Newbie
    Replies: 7
    Last Post: 22nd October 2008, 16:41

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.