[Interest] QTableView::moveCursor and scrolling to end
alexmalvtk at gmail.com
Tue May 14 22:44:09 CEST 2013
>> I wonder what do you in general do, when you find yourselves in the need
of accessing the private internals.
If you absolutely need private you usually end up writing your own class.
It happened to me 2 times during over 10 years of my Qt experience.
Otherwise you are looking for the ways not to use private data.
In this case I do not think you need it.
At least at the first glance I would try to install event handler which
would catch Ctrl+end,
disable update of the widget, process event, then call *
with the cell you need and enable update.
See no reason why this would not work.
On Tue, May 14, 2013 at 12:17 AM, Mojmír Svoboda <
Mojmir.Svoboda at warhorsestudios.cz> wrote:
> my problem is simple: when an user press ctrl+end to scroll to the end
> of the table then there is an implicit horizontal scroll to the right.
> My users requested few times already to disable that behaviour.
> I subclassed QTableView as i did not found any other way (sorry if i
> missed something obvious), but as soon as i tried to override moveCursor
> i started to fail because of internals like d->visualCursor or d->spans.
> Some of them seem trivial to bypass (like d->root, d->visualRow etc)
> some of them not (d->spans).
> I wonder what do you in general do, when you find yourselves in the need
> of accessing the private internals.
> Best regards,
> Interest mailing list
> Interest at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest