Last active
June 19, 2018 09:00
-
-
Save tpoveda/6e567393153d6a6a30f6f4e495f9179a to your computer and use it in GitHub Desktop.
Get handle size of QScrollBar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opt = QStyleOptionSlider() | |
self.view.horizontalScrollBar().initStyleOption(opt) | |
style = self.view.horizontalScrollBar().style() | |
handle = style.subControlRect(style.CC_ScrollBar, opt, style.SC_ScrollBarSlider) | |
sliderPos = handle.center() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment