user_mail07
25th March 2013, 18:33
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 –
QString scrollStyleSheet = “QTableWidget {}â€; // tried few variations too , but this works the best
ui->deviceGridTable->setStyleSheet(scrollStyleSheet );
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.
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 –
QString scrollStyleSheet = “QTableWidget {}â€; // tried few variations too , but this works the best
ui->deviceGridTable->setStyleSheet(scrollStyleSheet );
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.