PDA

View Full Version : Bug in QGraphicsView? ScrollBar problems



estanisgeyer
13th March 2008, 15:14
Good Day, Masters of QT!

Look at the image attached below is a bug QT? The scrollbar does not have the scroll buttons, only the central bar. I am using the theme plastik, QT 4.3.4

jpn
13th March 2008, 15:25
I'd suspect that to be a layouting problem. Did you install a layout on the frame? Did you add the graphics view to that layout?

estanisgeyer
13th March 2008, 15:37
Layou is ok.

jpn
13th March 2008, 15:48
Ok, can you attach a small test application which reproduces the problem?

estanisgeyer
13th March 2008, 16:00
Ok, please change include header ui_Report.h in Report.h and create the basic main.cpp.

Thanks,

Marcelo E. Geyer

estanisgeyer
13th March 2008, 16:06
The problem is caused when using stylesheets in QGraphicsView. I found that now

estanisgeyer
13th March 2008, 16:10
Thank you, I decided the problem using setBackgroundBrush() in QGraphicsScene that gave me the same result. But this can be considered a bug?

Thanks,

Marcelo E. Geyer.

jpn
13th March 2008, 18:44
You must use selectors to avoid applying the style sheet to every child (including scroll bars). So instead of

background-color: #CFCFCF;
use for example

QGraphicsView { background-color: #CFCFCF; }