2016-09-09 83 views
1

OBS Studio附帶默認黑暗主題。 默認主題使用本機系統風格(在我的情況下是Windows 10),而黑暗主題是一個自定義設計。Qt自定義樣式:滾動條的屏幕箭頭按鈕?

我注意到,定製設計不具有滾動屏幕上的箭頭按鈕:

on-screen arrow buttonenter image description here

不要Qt的滾動條有箭頭按鈕,還是他們被禁止QSS?如果是這樣,如何啓用它們?

回答

2

他們被qss文件Dark.qss禁用。這個樣式表隱藏了箭頭。根據您的要求

QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal { 
    border: none; 
    background: none; 
} 

QScrollBar::left-arrow:horizontal, QScrollBar::right-arrow:horizontal, QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { 
    border: none; 
    background: none; 
    color: none; 
} 

更改這些屬性來customize的QScrollBar:

如果你的代碼(如果沒有,檢查this),你可以看到下面的線。