Skip to content

Instantly share code, notes, and snippets.

@tpoveda
Last active June 19, 2018 09:00
Show Gist options
  • Select an option

  • Save tpoveda/6e567393153d6a6a30f6f4e495f9179a to your computer and use it in GitHub Desktop.

Select an option

Save tpoveda/6e567393153d6a6a30f6f4e495f9179a to your computer and use it in GitHub Desktop.

Revisions

  1. tpoveda renamed this gist Jun 19, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. tpoveda created this gist Apr 23, 2018.
    5 changes: 5 additions & 0 deletions scrollbar_handle_size.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    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()