Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Pen thickness in pixel for QGraphicsItem
Qt 6.12 LTS is out! See what's new in the release blog

Pen thickness in pixel for QGraphicsItem

Scheduled Pinned Locked Moved Unsolved General and Desktop
qgraphicsitemqpenpixelqpainter
1 Posts 1 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by A Former User
    #1

    Hi,

    How can I specify the thickness of the the QPainter's QPen in QGraphicsItem in terms of pixels (fixed) regardless of scene transformation? QGraphicsItem::ItemIgnoresTransformation would ignore all transformations. I would like to set only thickness of QPainter's pen.

    As an edit:

    Example would be equivalence to a QGraphicsLineItem with a constant line thickness (specified in pixels) even with zooming in/out.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt
    • Unsolved