I would like to show the value of the variable "filestatus" in the following line of code in blue. How?
Code:
self.ui.title.setText(str("My Tax Info Based on a Filing Status of: " + filestatus))
Thanks
Printable View
I would like to show the value of the variable "filestatus" in the following line of code in blue. How?
Code:
self.ui.title.setText(str("My Tax Info Based on a Filing Status of: " + filestatus))
Thanks
If "title" is a QLabel, you can format your string in Rich Text Format (RTF) using the subset of HTML supported by the rich text engine.
Code:
self.ui.title.setText(str("My Tax Info Based on a Filing Status of: <font color=blue>" + filestatus + "</font>" ))