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. How can I align certain widgets to specific points in a pixmap edges.
QtWS25 Last Chance

How can I align certain widgets to specific points in a pixmap edges.

Scheduled Pinned Locked Moved Unsolved General and Desktop
qgraphicsanchorlayoutanchoringpixmapqgraphicspixmap
2 Posts 2 Posters 590 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.
  • S Offline
    S Offline
    SajasKK
    wrote on last edited by SajasKK
    #1

    I want to have a widget containing a pixmap at the center and some other child widgets aligned to the edges of my pixmap.
    I was thinking of doing this using QGraphicsAnchorLayout
    Like, having the pixmap as a QGraphicsPixmapItem anchored at the center of my anchor-layout. And aligning widgets to the anchors around the pixmap item.

    1. Will it be possible for anchoring to work if the shape of the pixmap item that I'm interested in is the QGraphicsPixmapItem::MaskShape of the pixmap.
    2. Can I have custom anchor points that fall not on Qt::AnchorPoint or Qt::Corner, but on a specific point that I decide?

    Mock-up:
    0_1550225465386_Screenshot 2019-02-15 at 11.03.36.png

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      From the looks of it, you will likely have to implement your own layout.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

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