[Qt-interest] Making sure a table cell remains visible when the table is resized
Constantin Makshin
cmakshin at gmail.com
Fri Aug 26 16:41:23 CEST 2011
Hello!
There are two primary widgets in my application's main window — a QTableView and a QTextBrowser, separated by a vertical splitter. The latter is meant to display some hints regarding table contents and thus may be dynamically shown or hidden depending on the selected table cell and precense of any related documentation.
When the user selects a table cell and the QTextBrowser is shown, the QAbstractItemView's "delayed auto-scrolling" timer (http://qt.gitorious.org/qt/qt/blobs/4.7/src/gui/itemviews/qabstractitemview.cpp#line1681) makes sure the selected cell remains visible. But if I programatically select a cell that's somewhere at the bottom of the table while the QTextBrowser is hidden, that timer isn't triggered and activated QTextBrowser obstructs the cell.
I tried to call scrollTo() explicitly after changing the QTextBrowser's visibility state, but that didn't work. Is there any not-too-ugly way to solve this problem?
Thank you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110826/bab27ded/attachment.bin
More information about the Qt-interest-old
mailing list