Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Qt::ToolButtonIconOnly在垂直 QToolBar之间切换Qt::ToolButtonTextBesideIcon时,展开工具栏时图标会略微向右移动:
Qt::ToolButtonIconOnly
Qt::ToolButtonTextBesideIcon
是否可以获得稳定的图标,不会像这样向右移动?
我找到了 stylesheet 的解决方法QToolBar QToolButton { padding-right: 3px; }。为了在标签栏关闭时使图标居中,我在图标本身的左侧添加了一些间距。
QToolBar QToolButton { padding-right: 3px; }