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
6
votes
1 answer

PyQt 4: Making a label scrollable

I am trying to create a label where I can write the current status of the program - e.g.: "Reading data..." "Processing data..." "Complete." If the text reaches the bottom of the label, then it should automatically scroll with the text, to ensure…
EleventyOne
  • 7,300
  • 10
  • 35
  • 40
6
votes
2 answers

QScrollArea widget is not expanding with a Flowlayout

I have a ui with a QScrollArea Widget. The QScrollArea uses a Flowlayout. My problem is when I add widgets to my layout the scroll area begins to scroll and does not expand when it has room to expand. I want the scroll area to expand to its limit…
andre
  • 7,018
  • 4
  • 43
  • 75
6
votes
1 answer

How can i make widgets overflow to make a scrollbar appear in Qt?

The structure of my widgets is : QWidget customized to be a panel with rounded borders. To contain an area with scrollbar inside the borders with a margin, then I put this inside: QScrollArea with a QVBoxLayout (vertically adding content) Then I…
Darkgaze
  • 2,280
  • 6
  • 36
  • 59
5
votes
2 answers

PyQt: wrap-around layout of widgets inside a QScrollArea

I am developing an app for memorizing text using PyQt4. I want to show all the words in bubbles so that you see how long the word is. But when I have all the bubbles in my QScrollArea, they are aligned one under the other. I would like to have them…
Cheyn Shmuel
  • 428
  • 8
  • 15
5
votes
1 answer

QScrollArea with dynamically changing contents

I have a QScrollArea with some buttons in it, like shown on the picture. The idea of the layout is: 1. The left and right button should be used for scrolling the buttons when they are too wide 2.The numbers of buttons in the scroll area can be…
GeneralFailure
  • 1,085
  • 3
  • 16
  • 32
5
votes
1 answer

Add widgets to a ScrollArea

I am creating a window dimanica to the downloads list. But the scrollbar does not work and the "widgets children" are "cut". Where can I be wrong? Thanks. Source: QWidget *central = new QWidget; QScrollArea *scroll = new QScrollArea; …
Protomen
  • 9,471
  • 9
  • 57
  • 124
5
votes
1 answer

Make QTreeView automatically resize to contents

I am trying to make a QTreeView automatically resize to its contents. This is my setup: I am trying to create a "smart" tool tip which is a QWidget with Qt.Tool | Qt.FramelessWindowHint as its WindowFlags, which works nicely. It contains a layout…
rainer
  • 6,769
  • 3
  • 23
  • 37
5
votes
1 answer

Updating dynamic QGridLayout - Python PyQt

I recently started studying Python and now I'm making a software with a GUI using PyQt Libraries. Here's my problem: I create a Scrollarea, I put in this scrollarea a widget which contains a QGridLayout. sa = QtGui.QScrollArea() sa_widget =…
xuT
  • 318
  • 4
  • 15
5
votes
1 answer

How to prevent QAbstractScrollArea / QTableView from horizontal scrolling?

I have a QTableView and some content in it. I want a behavior like horizontalHeader() -> setResizeMode( ResizeToContent ) but it must not create horizontal scrollbars - I mean the viewport must not be wider than the table. Even with creating a new…
Charly
  • 1,270
  • 19
  • 42
4
votes
1 answer

How to change the background color of a QScrollArea without affecting the scrollbar color?

I'm using self.setStyleSheet("background-color: white") to change the background color of a QScrollArea in PyQt5, but that also affects the scroll bar. What is the proper way of just changing the area background color? import sys from…
dvilela
  • 1,200
  • 12
  • 29
4
votes
1 answer

PyQtGraph: prevent QScrollArea scrolling when panning plot

In PyQtGraph you can zoom into the plots with the scroll wheel. However, when embedding PyQtGraph inside a QScrollArea, scrolling both zooms into the hovered plot AND scrolls the QScrollArea. Minimal reproducable code: from PyQt5.QtWidgets import…
kangalio
  • 652
  • 8
  • 16
4
votes
1 answer

Cannot automatically resize a QScrollArea

My environment: Windows 10, 64-bit Microsoft Visual Studio 2015 Qt 5.6.2 Qt Creator 4.8.1 I have a dialog which contains a scroll area. The scroll area is initially empty: When the user clicks the check box, widgets are added to the scroll…
user1387866
  • 2,834
  • 3
  • 22
  • 28
4
votes
1 answer

Can I make a groupbox outside of a scroll area?

I have a QGroupBox with a title '123'. Inside the QGroupBox, there should be a QScrollArea. That means that the title '123' of QGrouBox should be outside of the QScrollArea. My sample codes are as below. import sys import PyQt4 from PyQt4.QtGui…
ryan9025
  • 267
  • 6
  • 17
4
votes
1 answer

Widgets wrapped in QScrollArea do not use up available size

Enter: the base code. Creates 25 QPushButtons wrapped in a QWidget with a QVBoxLayout, which (the QWidget) is itself the only child of a top-QVBoxLayout that handles widget placement in our top scroll_area_test-QWidget. The second QWidget wrapping…
Ionic
  • 499
  • 4
  • 18
4
votes
2 answers

How to change QTableView scrollbar position to be below header?

How to change scrollbar position from next to header to below header? Any ideas how to implement this are appreciated.
noee
  • 41
  • 5
1
2
3
19 20