Form
0
0
419
463
Form
20
100
21
21
QPlainTextEdit {
border-style: solid;
border-width: 2;
border-top-color: #666666;
border-left-color: #666666;
border-bottom-color: #cccccc;
border-right-color: #cccccc;
padding-top: -2px;
padding-left: -2px;
padding-right: -2px;
padding-bottom: -2px;
/* uncomment below to make it draw the border properly */
/* background-color: #FFFFFF;*/
}
QFrame::StyledPanel
Qt::ScrollBarAlwaysOff
Qt::ScrollBarAlwaysOff
8
60
90
241
41
Border +2, padding -2 for QPlainTextEdit hides border
true
20
70
21
21
QLineEdit {
border-style: solid;
border-width: 2;
border-top-color: #666666;
border-left-color: #666666;
border-bottom-color: #cccccc;
border-right-color: #cccccc;
padding-top: -2px;
padding-left: -2px;
padding-right: -2px;
padding-bottom: -2px;
}
8
16
260
61
41
QPlainTextEdit {
border-style: solid;
border-width: 10;
border-top-color: #666666;
border-left-color: #666666;
border-bottom-color: #cccccc;
border-right-color: #cccccc;
padding-top: -5px;
}
/* uncomment below to make it draw the border properly */
QFrame {
/* background-color: #FFFFFF;*/
}
QFrame::StyledPanel
Qt::ScrollBarAlwaysOff
Qt::ScrollBarAlwaysOff
8
16
200
61
41
QLineEdit {
border-style: solid;
border-width: 10;
border-top-color: #666666;
border-left-color: #666666;
border-bottom-color: #cccccc;
border-right-color: #cccccc;
padding-top: -5px;
}
8
86
260
61
41
QPlainTextEdit {
border-style: solid;
border-width: 10;
border-top-color: #666666;
border-left-color: #666666;
border-bottom-color: #cccccc;
border-right-color: #cccccc;
padding-top: -20px;
/* uncomment below to make it draw the border properly */
/* background-color: #FFFFFF;*/
}
QFrame::StyledPanel
Qt::ScrollBarAlwaysOff
Qt::ScrollBarAlwaysOff
8
86
200
61
41
QLineEdit {
border-style: solid;
border-width: 10;
border-top-color: #666666;
border-left-color: #666666;
border-bottom-color: #cccccc;
border-right-color: #cccccc;
padding-top: -20px;
}
8
26
130
201
41
A bigger border and negative top padding
true
166
260
131
41
QPlainTextEdit : Border is truncated
true
56
380
301
51
Note: adding background-color allows the border of QPlainTextEdit to draw correctly
true
60
60
241
41
Border +2, padding -2 works for QLineEdit
true
166
200
71
41
QLineEdit
true
26
160
51
41
Border +5, padding -10
true
96
160
51
41
Border +10, padding -20
true
86
320
61
41
QTextEdit {
border-style: solid;
border-width: 10;
border-top-color: #666666;
border-left-color: #666666;
border-bottom-color: #cccccc;
border-right-color: #cccccc;
padding-top: -20px;
}
/* uncomment below to make it draw the border properly */
QFrame {
/* background-color: #FFFFFF;*/
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;">8</span></p></body></html>
16
320
61
41
QTextEdit {
border-style: solid;
border-width: 10;
border-top-color: #666666;
border-left-color: #666666;
border-bottom-color: #cccccc;
border-right-color: #cccccc;
padding-top: -5px;
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;">8</span></p></body></html>
166
320
201
41
QTextEdit : Border is truncated
true
10
50
35
10
1 )
10
140
31
20
2 )