[英]Qt-Creator: How to set a application wide style sheet that can be seen in QTDesigner?
[英]How to customize style of qt-creator IDE
我會嘗試在樣式表(.qss)中為所有QToolBar項目設置iconSize。
QToolBar
{
qproperty-iconSize: 64px;
}
如果沒有反應,請嘗試對工具欄中的所有元素使用星號。
QToolBar *
{
qproperty-iconSize: 64px;
}
我的QToolBar樣式的示例。
.MainWindow QToolBar
{
qproperty-movable: true; /* set false, to be fixed in position */
qproperty-iconSize: 64px;
spacing: 8px;
subcontrol-origin: content;
subcontrol-position: center middle;
border: 1px solid red;
padding: 0px;
margin: 0px;
}
在MainWindow中,僅在工具欄上。
您必須猜測一下ToolBar的名稱。 如果您還為QStatusBar設置FontSize,則可以調整其大小。 以下是特定於App I風格的內容。
請參閱帶有標簽的實例選擇器。 這樣,我將所有字體的大小調整為一個大小,也將其所有子元素調整為一個大小。 在43英寸FullHD和2-3米的距離上,我想將Fontsize設置為22pt。
#MainWindowServerTabsWidget *,
QStatusBar *,
QMenu,
QMenu::tearoff,
QMenuBar,
MainWindow QToolTip
{
font-size: 16pt;
}
QDialogButtonBox
{
dialogbuttonbox-buttons-have-icons: false;
}
QDialog *, ImprovedWidget * /* enlarge all backbone fonts and icons */
{
font-size: 12pt;
qproperty-iconSize: 48px;
}
#ContentsWidget, #profileManager /* resize the width in options window for the left index and the profile index */
{
min-width: 180px;
}
如果您無權訪問類名,這是猜測。
如果運氣好的話,您可以為只有14英寸(最大)FullHD屏幕的我們提供Fontsize和Iconsize的值。
糟糕,忘記了StatusBar。
嘗試這個。
QStatusBar QLabel
{
font-size: 12pt;
}
或QStatusBar * {font-size:12pt; }
或不是很好的主意,但是...
QStatusBar
{
min-height: 40px;
font-size: 18pt;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.