QMessageBox displays Chinese as garbled characters

As shown in the figure, I want to output this information, but it is displayed as garbled characters

insert image description here
insert image description here
Solution:
Add it to the top of the cpp file #pragma execution_character_set("utf-8"), then rebuild and run it!
insert image description here

insert image description here

Guess you like

Origin blog.csdn.net/changyana/article/details/129980801