Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 11-23-2020, 06:34 PM   #1
Bradles
Connoisseur
Bradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmos
 
Bradles's Avatar
 
Posts: 70
Karma: 21074
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
Old 11-23-2020, 10:45 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
book_info.verticalScrollbar().triggerAction(QAbstr actSlider.SliderPageStepAdd)
kovidgoyal is offline   Reply With Quote
Old 11-24-2020, 01:14 AM   #3
Bradles
Connoisseur
Bradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmosBradles has become one with the cosmos
 
Bradles's Avatar
 
Posts: 70
Karma: 21074
Join Date: Nov 2020
Location: Perth, Western Australia
Device: Apple Books & Kobo Libra H20
Thanks Kovid. (Capital B in verticalScrollBar but all good.)

A PageStep was just a smidgen too far, so I subtracted a SingleStep and got the results I was looking for.
Bradles is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Book details panel luciaisacat Library Management 7 05-26-2017 04:24 AM
Lost my book details panel ElspethB Calibre 1 09-09-2016 01:11 PM
Book Details panel suddenly not scrollable Sirtel Calibre 3 01-12-2015 05:05 PM
Book Details Panel Position sophieturgeon Calibre 2 12-27-2014 08:08 AM
Metadata does not show in Book Details Panel Mamaijee Library Management 9 12-19-2012 02:33 AM


All times are GMT -4. The time now is 02:41 AM.


MobileRead.com is a privately owned, operated and funded community.