Results 1 to 2 of 2

Thread: QString Trick please

  1. #1
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QString Trick please

    I have the output below to a text browser using QTextBrowser::append()
    but I want to allign the columns in a more arranged manner (not like a snake type alignment) . so how can I accomplish this with QString ? Each row will be produced by function that returns a QString. I have tried
    Qt Code:
    1. QString:: arg ( const QString & a, int fieldWidth = 0, const QChar & fillChar = QLatin1Char( ' ' ) ) const
    To copy to clipboard, switch view to plain text mode 
    with the fieldWidth to be uinform but it seems that output is still mis alligned is there any other way of somehow formatting QString in some uniform width?


    Item , Configured, Detected
    Software Version, 0, 0
    Hardware Version, 0, 0
    FPGA Version, 0, 0
    Serial No., 0, 0
    IP Address , 0.0.0.0, 0.0.0.0
    Global Id , 0, 0

    note: "comma" is the end of a column


    baray98

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QString Trick please

    Put it in an html table and set the resulting html in the text browser.

Similar Threads

  1. easiest Way QString can do
    By baray98 in forum Qt Programming
    Replies: 12
    Last Post: 15th April 2008, 20:49
  2. QString static callback function from CURL
    By tpf80 in forum Qt Programming
    Replies: 12
    Last Post: 16th May 2007, 20:47
  3. Convert from iso-8859-1 to... Something else :-)
    By Nyphel in forum Qt Programming
    Replies: 4
    Last Post: 7th March 2007, 17:59
  4. Converting QString to unsigned char
    By salston in forum Qt Programming
    Replies: 3
    Last Post: 24th April 2006, 22:10
  5. [SOLVED] Widget plugin ... how to ?
    By yellowmat in forum Newbie
    Replies: 10
    Last Post: 29th January 2006, 20:41

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.