Results 1 to 3 of 3

Thread: [Solved] display speech mark in messagebox...help me please

  1. #1
    Join Date
    Jun 2009
    Location
    AKL | New Zealand
    Posts
    62
    Thanks
    21
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Unhappy [Solved] display speech mark in messagebox...help me please

    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.
    Last edited by cooper; 10th June 2009 at 23:15.

  2. #2
    Join Date
    Jun 2009
    Posts
    11
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: display speech mark in messagebox...help me please

    You have to escape them:
    Qt Code:
    1. QString string = "Hello \"world\"";
    To copy to clipboard, switch view to plain text mode 

    Greets
    h0nki

  3. The following user says thank you to h0nki for this useful post:

    cooper (10th June 2009)

  4. #3
    Join Date
    Jun 2009
    Location
    AKL | New Zealand
    Posts
    62
    Thanks
    21
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: display speech mark in messagebox...help me please

    thanks, it works.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.