Questions tagged [qscrollarea]

QScrollArea is a Qt class that provides scrolling functionality to other widgets.

QScrollArea displays the contents of another widget within some frame. If that widget is bigger than the frame and does not fit, scrollbars will be provided so the entire widget can be viewed.

QScrollArea allows changing the scrollbar policies (which determine if the scrollbars are always on, always off, or activated when needed), and to programmatically get and set the scrollbar values.

It also allows customizing the visual appearance of the scrollbars.

Official documentation can be found here.

298 questions
0
votes
1 answer

Add widget next to qscrollbar

How do I place a widget next to a QScrollbar like here seen: I use a QScrollArea and overwrite the Horizontal-QScrollBar. First I thought, I could use the paintEvent to draw a text like the "100 %" next to the bar. But I can only overwrite the…
Viatorus
  • 1,804
  • 1
  • 18
  • 41
0
votes
1 answer

Pyside - Scroll Area: My scroll area doesn't scroll when I add items

I am trying to create a program that search for repeated files and add this repeated files in a Qt interface. My idea in to search the repeated files and show this items in a scroll area. The problem is that when I add items to the scroll area the…
alcarnielo
  • 55
  • 1
  • 9
0
votes
0 answers

Qt menubar disappears when I use scroll area

I want to implement a vertical scroll bar. I have implemented layouts for this(see the attached layouts.jpg), and also scroll area(see snippet in below code). Yet, when I run, the window does not have menubar. What am I missing here? I tried adding…
cappy0704
  • 557
  • 2
  • 9
  • 30
0
votes
2 answers

qt widen QScrollBar when hover using StyleSheet

I'm trying to change the width of a vertical QScrollBar with a custom stylesheet like QScrollBar:vertical { border: 2px solid grey; background: #32CC99; width: 10px; margin: 22px 0 22px 0;" } QScrollBar:vertical:hover { …
Mike Shaw
  • 373
  • 7
  • 22
0
votes
1 answer

scrollbars in scrollarea doesn't work

I've got stuck in this problem and try almost all other similar problems, but none of them doesn't work, any help appreciate it. Problem, i have a custom widget, in my custom widget i have a QScrollArea and inside QScrollArea i have a Qlabal that…
Vahid
  • 76
  • 6
0
votes
1 answer

Accessing scrollbars in QScrollarea causes a runtime fault

Having some issues with QScrollAreas.. I want to be able to dynamically enable/disable scrollbars, and as such I tried implementing scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);` This causes the application to terminate with…
0
votes
1 answer

QDialog and scroll areas: how to merge them?

From the ImageViewer example: ImageViewer::ImageViewer() { imageLabel = new QLabel; imageLabel->setBackgroundRole(QPalette::Base); imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); …
Pietro
  • 12,086
  • 26
  • 100
  • 193
0
votes
0 answers

Orphan QScrollArea remains after adding to layout

I'm having trouble adding a QScrollArea to a layout within a QDialog widget. When I add the scroll area to the layout, it appears where I want it with the widget I've assigned to it and it scrolls just fine. However, I am also left with a blank…
Brian Spisak
  • 63
  • 1
  • 4
0
votes
1 answer

Nothing showing up in QScrollArea

I have a nice widget that basically looks like a dialog box with a bunch of QSliders on it. The number of sliders varies depending on the situation when the dialog (not an actual QDialog; just a QWidget) is invoked. Since the varying number of…
norman
  • 5,128
  • 13
  • 44
  • 75
0
votes
1 answer

QVBoxLayout in QScrollWidget is not updating Sizes

I have a QVBoxLayout as a pointer in my window and want to add Widgets dynamically (When the user presses a button, a Widget is added to the VBoxLayout). The VBoxLayout is set as Layout in the ScrollArea. But if I add Widgets to the VBoxLayout, the…
feedc0de
  • 3,646
  • 8
  • 30
  • 55
0
votes
1 answer

QScrollArea and floating widgets

I have QScrollArea with a lot of buttons (or other widgets) created at runtime. The idea is that scroll area has only vertical scrollbar. If some widget can't fit in current line/row then it jump to next line/row. It should work like "word wrap". I…
Dibo
  • 1,159
  • 17
  • 34
0
votes
2 answers

QScrollArea won't scroll

I am trying to put a QtableWidget inside a QScrollArea (only one widget) to be able to scroll it vertically and horizontaly (I have reasons not to use scrollbars in Qtablewidget ). However, no scrollbar appears even though the tableWidget can’t fit…
Aleksandar
  • 3,541
  • 4
  • 34
  • 57
0
votes
0 answers

A scrolling list of widgets without QListWidget

I need to list a bunch of custom widgets in a scrolling area. I would normally just use QListWidget, but that does not do smooth scrolling, which for me is a necessity. I found this question about smooth scrolling in a QListWidget, but when I try…
KFox
  • 1,166
  • 3
  • 10
  • 35
0
votes
0 answers

Scrollbars disappear when try to overload paintEvent function

I have a QLabel in a QScrollArea. When I set the label's pixmap with the setPixmap function, the scrollbars appear to cover entire image. But when I try to overload the paintEvnet function and draw an image with QPainter::drawImage, scrollbars…
Hesam Qodsi
  • 1,569
  • 3
  • 25
  • 38
0
votes
3 answers

QScrollBar + QScrollAera in QTabWidget

My question is simple : how can I set a QScrollBar in my QScrollArea. I have tested a lot of things but nothing work ... Maybe it's a problem to set a QScrollArea in a QTabWidget ? Here is the code : void GamesWindow::createTabSucces() { …
Zat42
  • 2,471
  • 4
  • 22
  • 36
1 2 3
19
20