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. Create this kind of tiled map with QGraphicsScene
Qt 6.11 is out! See what's new in the release blog

Create this kind of tiled map with QGraphicsScene

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.0k 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.
  • N Offline
    N Offline
    nostrora
    wrote on last edited by
    #1

    Hello,
    i never used QGraphicsScene but today, i need to recreate this kind of tiled map
    http://i.snag.gy/CeF5M.jpg

    i wish to choice color of cell, and can click on each cell.

    I do not know where to start. Can you advice me ?
    I think i should QGraphicsItem use for cell, or maybe QGraphicsPolygonItem.

    Thanks all

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DBoosalis
      wrote on last edited by
      #2

      Since your using rectangles, I'd use QGraphicsRectangle and just rotate them. Should be plenty of examples for QGraphicsView

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nostrora
        wrote on last edited by
        #3

        The setRotation(45) is not good for me
        See :

        without setRotation(45) http://i.snag.gy/cUFzm.jpg

        With setRotation(45) http://i.snag.gy/A2DNm.jpg

        i setRotation on EACH rectangle

        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