Hi All,

I've two little trouble with my QComboBox that make me crazy.
The first one, is that i would like to right align the selected item text via CSS inside QComboBox.(like the behavior of the QSpinBox).
qcombo.png
I tried, more or less, everything inside my css but seems impossible to do.
This is my current CSS:
Qt Code:
  1. border: 1px solid darkgray;
  2. border-radius: 0px;
  3. padding-right: 20px;
  4. min-width: 6em;
  5. color: black;
  6. }
  7.  
  8. QComboBox:!editable, QComboBox::drop-down:editable {
  9. selection-color: rgb(0, 150, 200);
  10. background: white;
  11. }
  12.  
  13. QComboBox::drop-down {
  14. subcontrol-origin: padding;
  15. subcontrol-position: top right;
  16. width: 15px;
  17. height: 30px;
  18. border-width: 0px;
  19. border-left-width: 1px;
  20. border-left-color: darkgray;
  21. border-left-style: solid; /* just a single line */
  22. border-top-right-radius: 0px; /* same radius as the QComboBox */
  23. border-bottom-right-radius: 0px;
  24. }
  25.  
  26. QComboBox::down-arrow {
  27. image: url(:/images/icons/caret-down_262626_16.png);
  28. }
  29.  
  30. QComboBox::drop-down:on {
  31. top: 0px;
  32. left: 0px;
  33. background: rgb(0, 150, 200);
  34. }
  35.  
  36. /* background-color: rgb(0, 150, 200);
  37.   border-radius: 0px;*/
  38. selection-background-color:white ;
  39. selection-color:rgb(0,150,200) ;
  40. }
To copy to clipboard, switch view to plain text mode 

The second question is regarding the items in the QComboBox list. Is possible, still through CSS, to set height of those items?
More in detail, i would like to increase the space between the items. How you can see from the picture below, the height is the same of each item.
height.png

Thanks a lot for any suggestion.