Draw separator between overlapping QTableviews
-
a lazy way would be to make a overlay qframe line with 5 pixel thickness on top of tableview in void showEvent(QShowEvent *);
Its location can be found easily.
A better way would be to draw bottom or top border lines of all items in that row by overriding the paint event. -
@JoeCFD I tried already your second suggestion.
My problem, was that I am not able to paint on the middle of the grid, because the frozen view lays on top of the "normal" view and if I repaint the normal view border, one half of the border is hidden by the frozen view. and if i try that with the frozen view I can only paint one half of the Line because i cant paint over the borders of the Widget.
-
@JoeCFD I like the idea with the QFrame but I am not realy sure how to do that..
https://doc.qt.io/qt-5/qframe.html I guess I would need the VLine version right? because I only need the separator on one side. But how would I determine which side?
-
Hi,
Just a wild guess but what about keeping the border in the stylesheet but fix them all to 0 except the one you want with 5px ?
-
What result did you get from my suggestion ?