现在我在 QMessageBox 中显示一个带有文本的窗口。它可以工作并准确地显示文本。
profBox = QMessageBox()
QMessageBox.about(self,'Profile', "Gender: <br /> Age: < br />") #Ideal output is gender: F (stored in a variable) and Age: X (also stored in a variable)
我想在 Gender & Age 之后包含某些变量的值,但我对包含变量值的语法感到好奇。我先将它们转换为字符串吗?我如何包含它们,因为 .about 框最多只能接受三个参数?
谢谢!