Obviously your data bins cover squares with a size of 1, f.e one square is from 5-6, 10-11. So if you want to have a ticks centered its positions need to be 5.5, 10.5.
But I guess what you really want is a square at 4.5-5-5, 9.5.10.5 - probably by using qRound() instead of floor ( = casting to int ) in YourRasterData::value().
Uwe
PS: If the resolutions of your data is 1x1 don't forget to implement YourRasterData::rasterHint(). It will make the rendering process much faster.
Bookmarks