Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 6

Qt-interest Archive, May 2008
QTextEdit pagescroll


Message 1 in thread

  Hi list,

[Qt-4.3.4]

A QTextEdit can be scrolled down by a page by issuing:
QTextEdit::moveCursor(QTextEdit::MovePageDown);
but that's a Qt3 support function.
The documentation suggests to use the QTextCursor class instead.

OK, but QTextCursor apparently doesn't have the concept of a page. 
There is an enum QTextCursor::MoveOperation that has moves by 
characters, lines, words, blocks, but not pages.

Am I missing something? How should one proceed to translate that 
moveCursor() call to Qt4 without QT3_SUPPORT?

Thanks,

-- 
 [ signature omitted ] 

Message 2 in thread

PageUp & PageDown really depends on how many lines are visible in the
control. Once you get that number then use MoveOperation by number of lines
visible - 1 or -2 (if there is only 1 or 2 lines visible then you really
navigate only 1 or 2 lines).

"Daniel Vérité" <daniel.verite@xxxxxxxxx> wrote in message
news:g1f2qr$b7j$1@xxxxxxxxxxxxxxxx
>   Hi list,
>
> [Qt-4.3.4]
>
> A QTextEdit can be scrolled down by a page by issuing:
> QTextEdit::moveCursor(QTextEdit::MovePageDown);
> but that's a Qt3 support function.
> The documentation suggests to use the QTextCursor class instead.
>
> OK, but QTextCursor apparently doesn't have the concept of a page.
> There is an enum QTextCursor::MoveOperation that has moves by
> characters, lines, words, blocks, but not pages.
>
> Am I missing something? How should one proceed to translate that
> moveCursor() call to Qt4 without QT3_SUPPORT?
>
> Thanks,
>
> -- 
>  Daniel
>  PostgreSQL-powered mail user agent and storage:
> http://www.manitou-mail.org
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
"unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/


--
 [ signature omitted ]