Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGraphicsAnchorLayout Issues
Qt 6.11 is out! See what's new in the release blog

QGraphicsAnchorLayout Issues

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 435 Views 1 Watching
  • 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.
  • J Offline
    J Offline
    jbrown
    wrote on last edited by
    #1

    I am using QT 4.8 with a QGraphicsAnchorLayout in a QGraphicsScene which is causing rendering issues. If I try to anchor two widgets to their Qt::AnchorVerticalCenter the horizontal borders on any sub-widgets get cut off. I am using it like so:

    layout.addAnchor(widgetA, Qt::AnchorVerticalCenter, widgetB, Qt::AnchorVerticalCenter);
    

    Any other combination of anchors works correctly, but when both widgets use the vertical center widgets get cut off. Is this a bug in QT or is there a way to work around it?

    Related to this, what is the easiest way to add pixel offsets to the anchors, do I need to use invisible graphics items as spacers, or is there a better way? I do not want to use the layout content margins or spacing because I do not want the offsets applied to the entire layout. Any help is appreciated.

    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 Extensions
    • Unsolved