Hi everyone!
I recently started using Qt. Everything was fine, but once I worked with QScrollBar.
I needed to find out the coordinates of the Sub Controls.
For example, to find out the QStyle :: SC_ScrollBarSubLine coordinates and dimensions, I used the following code:
Qt Code:
opt->initFrom(scrollBar1); To copy to clipboard, switch view to plain text mode
This code works great with a horizontal scrollbar.
Because with a vertical scrollbar, it is not possible to get coordinates and dimensions QStyle :: SC_ScrollBarSubLine.
More precisely, sizes and coordinates can be obtained,
but they will be equal to the size and coordinates of the QStyle :: SC_ScrollBarSubLine horizontal scroll bar.
Take a look at the pictures. They graphically show what I'm trying to find out.
Maybe some of you already encountered similar problems. Tell me how to solve them?
SubLineSize.pngQScrollBarTest1.png
Bookmarks