PDA

View Full Version : QScrollbar bottom problem



Alundra
5th June 2014, 21:27
Hi all,
QScrollbar has one big issue :
http://uppix.com/f-Scrollbar5390c4520016a883.png
Look at the bottom of the scrollbar, you will understand.
The bottom is on the border of the widget.
I tried a lot of way to kill it, no one works.

anda_skoa
5th June 2014, 21:39
Explicit scrollbar? Scrollbar of a widget? Tried a different widget style?

Cheers,
_

Alundra
5th June 2014, 22:15
Without "App.setStyleSheet( StyleSheet );" I don't see the problem, you right.
What is weird is I commented all the "QScrollbar" and "QAbstractScrollArea", the problem is there.
I will add in a new stylesheet part by part and stop when the problem is there, surely the best here because my stylesheet = 932 lines.

Alundra
6th June 2014, 04:47
All works fine until I have :

QAbstractItemView
{
alternate-background-color: #3A3939;
color: silver;
border: 1px solid #3A3939;
border-radius: 3px;
padding: 1px;
}
The problem is the same with only :

QAbstractItemView
{
border: 1px solid #3A3939;
}
Hope you know a solution for that.

EDIT:
Apparently on the global stylesheet remove it is not enough.
Here a screen who shows better the problem :
http://uppix.com/f-Scrollbar53912e4f0016a965.png

Alundra
6th June 2014, 15:35
Here a minimal code that reproduces the bug of Qt :


#include <QtWidgets//QApplication>
#include <QtWidgets/QPlainTextEdit>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QPlainTextEdit e;
e.insertPlainText("a\na\na\a\na\na\na\na\na\na\na\na\na\na\na\na\na\n");
e.setStyleSheet("QPlainTextEdit{ border: 1px solid black; }");
e.show();
return a.exec();
}