PDA

View Full Version : [Solved] display speech mark in messagebox...help me please



cooper
10th June 2009, 23:05
hi,

usually, when i try to display a message in a pop up messagebox, i use:


QMessageBox::warning(this, "Warning", "Hello the world", QMessageBox::Ok);


this will show Hello the world in the message box.

however, what if i want to display Hello the "world" ? i wanna to show these two speech mark in the message. what should i do?

thanks in advance.

h0nki
10th June 2009, 23:21
You have to escape them:

QString string = "Hello \"world\"";

Greets
h0nki

cooper
11th June 2009, 00:14
thanks, it works.