View Single Post
Old 11-23-2020, 06:34 PM   #1
Bradles
Zealot
Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.Bradles turned on, tuned in, and dropped out.
 
Bradles's Avatar
 
Posts: 112
Karma: 35586
Join Date: Nov 2020
Location: Perth, Western Australia
Device: Apple Books & Kobo Libra H20
Scrolling the book details panel

Hi folks,

I'm making the world's most boring plug-in to scroll the book details panel in response to a spacebar if there is more then one "page" of book info:

Code:
self.gui.book_details.book_info.moveCursor(QTextCursor.End)
This scrolls to the end, which is okay if there's only two pages of text, but ideally I want to scroll down one page at a time.

I tried
Code:
QTextCursor.NextBlock
, but there are so many blocks (Authors, IDs, Formats, etc.) that it takes too many spacebars to get moving.

Any thoughts? Basically looking for the equivalent of clicking on the scroll bar, or sending a "Page Down" keypress.

Smooth scrolling would be a bonus, but I don't think that's possible.
Bradles is offline   Reply With Quote