tags:

views:

42

answers:

1

I have a window with 2 QTableWidgets, having their scrolling synchronized. The 1st one usually has horizontal scroll, while the 2nd usually (automatically) not. In order for them to show consistent data (row against row) I make the 2nd have the scroll (through property HorizontalScrollBar -> AlwaysOn).

But sometimes the 1st table doesn't have the scroll. What's event worse, it may have it or not depending on the window size (when making window wider the scroll disappears). As far as I see there's no signal for resize of window or control (widget).

I can, of course, use some constantly running timer to check if 1st table has scroll, but I wounder if there's more pure solution.

Thanks!

A: 

The answer was to reimplement the resizeEvent and check table.horizontalScrollBar().isVisible()

Guard