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. QStyleditemdelegate painting over the edge
Forum Updated to NodeBB v4.3 + New Features

QStyleditemdelegate painting over the edge

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.4k 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.
  • A Offline
    A Offline
    AndreasF
    wrote on last edited by
    #1

    Hello,

    I've implemented my custom delegate to draw vertical bars into a QTableView cell. Problem is that the option.rect can overlap to the next cell and is paint over if the next row is painted.

    Any suggestion to resolve such behavior?

    !http://andreas-franke.org/home/home@andreas-franke.org/public/paint.jpg(delegatePaint)!

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      -set the clipping rect of the painter to option.rect-

      oh did get you wrong (the images wasn't displayed first time). You do want to overpaint. Then QTableView isn't the right way to go... you already found the reason why. ;)
      An item-cell should only paint inside it's designated area.

      Nevertheless if you insist in using QTableView you need to draw the overlapping part in the other cell...

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AndreasF
        wrote on last edited by
        #3

        [quote author="raven-worx" date="1375883471"]-set the clipping rect of the painter to option.rect-

        oh did get you wrong (the images wasn't displayed first time). You do want to overpaint. Then QTableView isn't the right way to go... you already found the reason why. ;)
        An item-cell should only paint inside it's designated area.[/quote]

        Ok, but what is the right way get a table with desired appearance?

        1 Reply Last reply
        0
        • raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          i've edited my post:
          [quote author="raven-worx" date="1375883471"]
          Nevertheless if you insist in using QTableView you need to draw the overlapping part in the other cell...[/quote]

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • A Offline
            A Offline
            AndreasF
            wrote on last edited by
            #5

            Ok, thank you for your hint.

            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