首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > QT开发 >

怎么改变文本内区域滚动条的样式

2012-09-03 
怎样改变文本内区域滚动条的样式?QTextEdit当文本过大出现滚动条,那个滚动条的样式可以改变吗?[解决办法]Q

怎样改变文本内区域滚动条的样式?
QTextEdit 当文本过大出现滚动条,那个滚动条的样式可以改变吗?

[解决办法]
QTextEdit QScrollBar::vertical {margin: 15px 0px 15px 0px;background-color: rgb(150, 150, 150, 100); border: 0px; width: 15px;}
QTextEdit QScrollBar::handle:vertical {background-color: blue;}
QTextEdit QScrollBar::handle:vertical:pressed {background-color: rgb(200,20,220,0); }
QTextEdit QScrollBar::add-page:vertical {background-color: black; }
QTextEdit QScrollBar::sub-page:vertical {background-color: black; }
QTextEdit QScrollBar::sub-line:vertical {subcontrol-origin: margin; border: 0px solid black; height:15px}
QTableWidget QScrollBar::add-line:vertical {subcontrol-origin: margin; border: 0px solid black; height:15px}
QTextEdit QScrollBar::up-arrow:vertical { background-color: rgb(200,20,220,0); }
QTextEdit QScrollBar::down-arrow:vertical { image: url(:/resource/down_arrow.PNG); }
QTextEdit QScrollBar::horizontal {margin: 0px 15px 0px 0px;background-color: rgb(150, 150, 150, 100); border: 0px; height: 15px;}
QTextEdit QScrollBar::handle:horizontal {background-color: rgb(200,0,0,220); }
QTableWidget QScrollBar::handle:horizontal:pressed {border-image: url(:/resource/handle_horizontal_pressed.PNG); }
QTableWidget QScrollBar::add-page:horizontal {background-color: black; }
QTableWidget QScrollBar::sub-page:horizontal {background-color: blue; }
QTextEdit QScrollBar::add-line:horizontal {subcontrol-origin: margin; border: 0px solid black; width:15px}
QTextEdit QScrollBar::sub-line:horizontal {subcontrol-origin: margin; border: 0px solid black; width:15px}
QTextEdit QScrollBar::left-arrow:horizontal { image: url(:/resource/left_arrow.PNG); }
QTableWidget QScrollBar::right-arrow:horizontal { image: url(:/resource/right_arrow.PNG); }

[解决办法]
通过样式表设置 见2楼
[解决办法]

探讨

QTextEdit QScrollBar::vertical {margin: 15px 0px 15px 0px;background-color: rgb(150, 150, 150, 100); border: 0px; width: 15px;}
QTextEdit QScrollBar::handle:vertical ……

热点排行