PyQt Basic Widgets PyQt QScrollBar Widget - PyQt

What is PyQt QScrollBar Widget?

A scrollbar manage allows the user to access parts of the file this is outdoor the viewable area. It presents visual indicator to the present day position. It has a slider through which a value between a preset range is set in analogous style. This value is normally correlated to bring a hidden information in the viewport.

The scrollbar manage has four controls –

PyQt - QScrollBar Widget

Following signals of QScrollBar class are frequently used –

S.No.

Methods & Description

1

valueChanged()

When the scrollbar’s value changes

2

sliderMoved()

When the user drags the slider

Example

In the following example, three scroll bars are placed to control RGB values of font color for the text shows in a label. The complete code is as follows –

The above code produces the following output −

PyQt - QScrollBar Widget

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

PyQt Topics