[Interest] QTableView::moveCursor and scrolling to end
Alex Malyushytskyy
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 *
*setCurrentIndex<http://qt-project.org/doc/qt-4.8/qabstractitemview.html#setCurrentIndex>()
with the cell you need and enable update.
See no reason why this would not work.
Regards,
Alex
On Tue, May 14, 2013 at 12:17 AM, Mojmír Svoboda <
Mojmir.Svoboda at warhorsestudios.cz> wrote:
> Hello,
>
> 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,
> Mojmir
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130514/907ecdb4/attachment.html>
More information about the Interest
mailing list