Questions tagged [qscrollbar]
25 questions
3
votes
1 answer
PyQt - Custom scrolling with QListWidget
I am trying to figure out a way to customize the scrollbars for QListWidget to have the scrollbars above and below the QListWidget instead of the normal vertical and horizontal scrollbars.
Please check out my example below if you don't…

Richard
- 445
- 1
- 5
- 21
2
votes
1 answer
ScrollBar QStyleSheet displayed with a background when It should be transparent
I'm trying to style the scroll bar of a QtTableWidget so the part where the "scrolling part" isn't on the bar is transparent so the scrollbar would be of the color of the background and the scrolling part (where you put your mouse) is the only part…

louisab
- 49
- 6
1
vote
1 answer
Qt QScrollBar slider shadow
How can I set the shadow to slider handle of a QScrollBar like this required style?
Inherited a class from QScrollBar, configured QStyleSheet as in the picture, tried to add a GraphicsEffect, but it is added to the whole QScrollBar, but not to the…

Артем Иванов
- 13
- 2
1
vote
1 answer
How can I add a vertical scrollbar to a QListWidget()
I have a QListWidget which contains QListWidgetItems that exceed its visible boundaries and I would like to add a vertical Scrollbar. I have tried the following:
sz = QtCore.QSize(200,200)
_lstwdgt = QtGui.QListWidget(parent)
_item =…

stdcerr
- 13,725
- 25
- 71
- 128
1
vote
1 answer
QScrollBar singleStep is different from its actual step
When I Scroll a widget in QScrollArea, its scrollbar's step is not singleStep() but singleStep() * 3.
I set singleStep of QScrollArea's verticalScrollBar() to 30 in order to scroll 30 per scroll, but it scrolls 90 per…

Anns98
- 736
- 6
- 6
1
vote
1 answer
PyQt5: is there a signal when a QScrollBar visibility changes?
I am working in Maya with pyside2 (basically the same as PyQt5).
I have a gui with a scroll area in it... The scroll area has rows of some buttons and stuff that I want to expand horizontally if the user drags the window and expands it larger. …

silent_sight
- 492
- 1
- 8
- 16
1
vote
0 answers
How to change QScrollbar's background color without changing the handle's shape?
I am trying to change the background color of the scrollers in my QGraphicsView using stylesheet. But it also changes the handler's shape from a nice rounded bar to an ugly rectangle. Is it possible to retain the original shape? Here is the…

Thinium
- 171
- 1
- 14
1
vote
1 answer
Qt Creator (Designer): Single text line with horizontal scrollbar
How do I get a single text line with only a horizontal scollbar?
I think that's all there is to this question.
I've tried it with QLineEdit only or withing QScrollArea, with QTextEdit etc, and nothing was remotly close to working properly.
That's…

Cpt. Crazy
- 115
- 1
- 11
1
vote
1 answer
Getting the size/width of a scrollbar thumb in PyQt5?
Say, you have a PyQt5 scrollbar:
I would like to programmatically find the width of the scrollbar "thumb" (edit: called "slider" in http://pyqt.sourceforge.net/Docs/PyQt4/qscrollbar.html), as well as its location; I guess pixels would be the…

sdaau
- 36,975
- 46
- 198
- 278
1
vote
1 answer
QTreeWidget with non-native scroll bar when background changed
I need a QTreeWidget with transparent background so it has the same color as the native light-gray window background. This works fine by setting the background to transparent.
The problem is that if I do this, the scroll becomes non-native looking.…

Rolli
- 41
- 7
1
vote
0 answers
QScrollbar drawing over top of border
I have a QListView that I have given a border. The scroll bar when it appears seems to be drawing over top of my border
example scrollbar image
This is most notable at the bottom where there is a dark bar over the border and the inside of the…

Brandobaris
- 57
- 6
0
votes
0 answers
Python QTreeWidget const columns
Is there any way to have a QTreeWidget with horizontal scroll bar but to have some specific columns (for example the first and the second) be const as the user scrolls horizontally?
As for now there is no need to do something like that, but just in…

Chris P
- 2,059
- 4
- 34
- 68
0
votes
0 answers
PyQt5 vertical scrollbar in gridLayout
Good afternoon, I have this code which creates the basic layout of the page and fills it with the necessary widgets. This code is compiled from Qt designer.
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
…

Mary
- 1
0
votes
1 answer
Zoom to mouse position - pyside6
Hello I am tring to implement simple image widget with zoom to mouse position. I combined the example at Zooming in/out on a mouser point ? and https://doc.qt.io/qt-5/qtwidgets-widgets-imageviewer-example.html. However the image do not scale as…

gragas01
- 25
- 5
0
votes
0 answers
Unexpected QScrollBar value in PyQt5/PySide2
I'm following a previous answer on here to allow me to scroll the content of a matplotlib axes using a PyQt5 (or Pyside2) QScrollBar.
However, I've noticed that the value of the scroll bar is not always what I would expect, regardless of what I'm…

Paul
- 515
- 3
- 9