我想在同一个 qlabel 中获得 rss feed 的结果。这是我的标签
Title = QLabel("Title: %s " % (title.text), self)
desc = QLabel("Summary: %s " % (desc.text), self)
这是我当前的布局
h_splitter1 = QSplitter(Qt.Horizontal, self)
h_splitter1.addWidget(Title)
h_splitter1.addWidget(Desc)
截至目前,它显示在单独的拆分框中。我怎样才能将它们组合起来,使它们像这样显示:
Title: Price, Sox look forward to re-setting Tuesday
Desc: Red Sox ace David Price had no issue with Monday's "coldout" in Cleveland. Roughly an hour after the decision had been made to postpone Opening Day until Tuesday at 1:10 p.m. ET, Price still had numbness in his throwing hand -- and that was just from playing catch for five minutes.
第二个问题是我怎样才能将 DES 包裹在分线盒中?假设在 x 个字符处转到新行。
最佳答案
desc = QLabel("Title: %s\nSummary: %s " % (title.text, desc.text), self)
关于Python Qt 和多行 qlabel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36412923/