“Combo box css in Qt” 可以翻译为 “Qt 中的组合框 CSS”。

huangapple go评论108阅读模式
英文:

Combo box css in Qt

问题

我想让Qt中的这个组合框看起来像Figma中设计的那个组合框。我对CSS不太擅长。

这是Qt中的原始组合框:
“Combo box css in Qt” 可以翻译为 “Qt 中的组合框 CSS”。

这是我想要实现的设计:
“Combo box css in Qt” 可以翻译为 “Qt 中的组合框 CSS”。

英文:

I want to make this combo box in Qt look like this designed combo box in Figma. I'm not that good with CSS.
This is the original combo box in Qt :
“Combo box css in Qt” 可以翻译为 “Qt 中的组合框 CSS”。

This is the design I want to make:
“Combo box css in Qt” 可以翻译为 “Qt 中的组合框 CSS”。

答案1

得分: 2

这里我将原始外观设为无,然后为其创建自定义按钮,以下是代码部分:

CSS:

  1. .select-menu{
  2. appearance: none;
  3. padding: 10px 30px 10px 10px;
  4. border: 1px solid #ccc;
  5. border-radius: 4px;
  6. background-color: #f2f2f2;
  7. background-image: url(arrow.svg);
  8. background-repeat: no-repeat;
  9. background-position: center right 25%;
  10. background-size: 20px;
  11. color: #333;
  12. width: 130px;
  13. }
  14. .select-menu::-ms-expand{
  15. display: none;
  16. }

“Combo box css in Qt” 可以翻译为 “Qt 中的组合框 CSS”。

英文:

this one i make the original appearance none then i make custom button for it this the code

css:

  1. .select-menu{
  2. appearance: none;
  3. padding: 10px 30px 10px 10px;
  4. border: 1px solid #ccc;
  5. border-radius: 4px;
  6. background-color: #f2f2f2;
  7. background-image: url(arrow.svg);
  8. background-repeat: no-repeat;
  9. background-position: center right 25%;
  10. background-size: 20px;
  11. color: #333;
  12. width: 130px;
  13. }
  14. .select-menu::-ms-expand{
  15. display: none;
  16. }

“Combo box css in Qt” 可以翻译为 “Qt 中的组合框 CSS”。

huangapple
  • 本文由 发表于 2023年7月13日 10:27:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76675522.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定