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.
我想在标签中放置一些文本。我几乎设法做到了:当我放大窗口时,我在<big>标签上添加了一些标签,文本随着窗口放大。但是,如果我尝试缩小窗口,标签的尺寸请求不允许我这样做。
<big>
标签每秒更新很多次,所以如果我每次应用新标签时都尝试设置自定义尺寸请求,如果我尝试缩小窗口,窗口将会缩小和放大。
我想要做的是删除大小请求,没有自动换行和其他类似的东西:我只想让标签离开窗口。
将标签放在像 GtkScrolledWindow 这样的容器中。
将 label 的“ellipsize”属性设置为 True。