Results 1 to 2 of 2

Thread: Displaying integer values into textbox

  1. #1
    Join Date
    Jan 2011
    Posts
    14
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Displaying integer values into textbox

    Hi....
    How to display integer values into textbox?

    how to do this?

  2. #2
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    131
    Thanks
    11
    Thanked 16 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Displaying integer values into textbox

    textbox?

    To convert a Iteger to a QString you can use for example:

    Qt Code:
    1. QString int_string = QString::number(123);
    2. // or
    3. QString int_string = QString("%1").arg(123);
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Item delegate displaying enumerated values
    By mclark in forum Qt Programming
    Replies: 2
    Last Post: 24th September 2010, 16:31
  2. Textbox
    By Devoraz in forum Qt Programming
    Replies: 6
    Last Post: 23rd July 2009, 06:37
  3. integer as a QTableWidgetItem ?
    By tommy in forum Qt Programming
    Replies: 7
    Last Post: 29th May 2009, 17:44
  4. Replies: 1
    Last Post: 25th July 2008, 08:38
  5. Inserting Integer Values to table.
    By kenny_isles in forum Newbie
    Replies: 2
    Last Post: 22nd February 2007, 07:17

Tags for this Thread

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.