QT Unknown property letter-spacing
时间: 2023-07-04 21:16:06 浏览: 186
"letter-spacing" is not a valid property in Qt. This property is typically used in web development to control the spacing between characters in text. In Qt, you can achieve similar effects using the "font" property to adjust the spacing between characters. For example, you can set the font's "letterSpacing" property to a positive or negative value to increase or decrease the spacing between characters. Here's an example:
```
QLabel {
font: 12pt "Arial";
letter-spacing: 2px; /* This property is invalid in Qt */
letterSpacing: 2px; /* Use this instead */
}
```
In the example above, the "font" property sets the font family and size for the label, while the "letterSpacing" property adjusts the spacing between characters.
阅读全文