Results 1 to 3 of 3

Thread: LineEdit for Hexadecimal input

  1. #1
    Join Date
    May 2009
    Posts
    75
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default LineEdit for Hexadecimal input

    I need a LineEdit widget to edit a bytearray in hexadecimal format. Something like this:


    I want that LineEdit could take only [0-9][a-f][A-F] characters, and spaces should be added by widget only for visualization needs.
    value() method should return a bytearray (for the image example "\x1ahallo!!")

    there exest something on the web already done?

    thanks

  2. #2
    Join Date
    Sep 2009
    Posts
    72
    Thanked 10 Times in 10 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi
    Platforms
    Unix/X11 Windows

    Default Re: LineEdit for Hexadecimal input

    Hi

    QLineEdit::setInputMask method you can use for hexadecimal inputs


    setInputMask("HH HH HH HH HH HH ;")

  3. #3
    Join Date
    May 2009
    Posts
    75
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: LineEdit for Hexadecimal input

    Quote Originally Posted by vishwajeet.dusane View Post
    QLineEdit::setInputMask method you can use for hexadecimal inputs
    It works only for 50%
    I need to edit a line arbitrarily long

Similar Threads

  1. storing data in hexadecimal format
    By aj2903 in forum Qt Programming
    Replies: 6
    Last Post: 13th January 2010, 05:29
  2. how to process hexadecimal
    By mohanakrishnan in forum Qt Programming
    Replies: 2
    Last Post: 20th November 2009, 04:33
  3. Replies: 4
    Last Post: 24th July 2009, 08:48
  4. Replies: 4
    Last Post: 22nd August 2008, 10:08
  5. converting the value from hexadecimal to decimal value
    By jjbabu in forum Qt Programming
    Replies: 2
    Last Post: 16th November 2007, 10:24

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.