Results 1 to 3 of 3

Thread: Creating a string with subscript text

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    40
    Thanked 8 Times in 4 Posts

    Default Creating a string with subscript text

    Hi guys,

    I have to draw some simple number in the Gscene, but the fractional part of that number should be printed as subscript.
    How to create a QString containg a subscript text? For example, is it possible to create a text with subscript part and show it in the QMessageBox? I am currently looking for a solution, but maybe someone has already done it before.

    Thanks.

    Maverick

    P.S.

    I have already checked the QTextDocument(but will not work in my case)
    I could create "paint" 2 texts where one would be on the left lower part of the first one, but that this is not acceptable.

    Found the solution:


    QMEssageBox::warning(0,QString("Upper<sub>lower</sub>"),"");
    Last edited by maverick_pol; 7th November 2007 at 16:16.
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. read input string --> text mode
    By eleanor in forum Qt Programming
    Replies: 1
    Last Post: 25th October 2007, 18:08
  3. creating query string from variables
    By locus in forum General Programming
    Replies: 2
    Last Post: 16th April 2007, 08:50
  4. Creating simple text editor from the eamples code
    By overcast in forum Qt Programming
    Replies: 4
    Last Post: 14th February 2007, 15:46

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
  •  
Qt is a trademark of The Qt Company.