Hello Everyone.

In QTable Widget, i am adding some items in certain columns using “setCellWidget()”. Whereas, to add items in other columns of the same row I am using “setItem()”.
When I tried to use vertical scroll bar, the items added by using “setItem()” scroll properly. But the items added by “setCellWidget()” do not scroll at all . They are frozen.

I tried following options:-

[1] I tried setting the stylesheet –
Qt Code:
  1. QString scrollStyleSheet = “QTableWidget {}”
To copy to clipboard, switch view to plain text mode 
; // tried few variations too , but this works the best
Qt Code:
  1. ui->deviceGridTable->setStyleSheet(scrollStyleSheet )
To copy to clipboard, switch view to plain text mode 
;

It works fine, so long as I do not scroll, when items are getting added. Before adding new items or after adding new items, if I scroll, it works fine. However, if I scroll, while new items are being added one by one , it shows the same old ugly characteristics which I just described.

[2] I tried setting “VerticalScrollMode” to “ScrollPerPixel”. It does not work at all.

What else can I try to fix the problem of vertical scrolling while items are detting added ? (Only for those items which are added using “setCellWidget()”. The problem is only on Mac OSX 10.8.1. I am using Qt 4.8.3

Thanks a lot.