Python Qt and multi row qlabel



我想在同一个qlabel中获得rss提要的结果。这是我的标签

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.

还有第二个问题是如何让Desc包装在拆分框中?假设有x个字符转到新行。

desc = QLabel("Title: %snSummary: %s " % (title.text, desc.text), self)

相关内容

  • 没有找到相关文章

最新更新