Results 1 to 2 of 2

Thread: Casting Byte to QChar or QString

  1. #1
    Join Date
    Nov 2015
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Question Casting Byte to QChar or QString

    Send and Receive Data using a USB-CAN-Adapter. I can talk to him using a dll which is loaded via the QLibrary object....
    there is a typedef, that must be as followed(used as paramter for an function out of a dll)

    typedef struct
    {
    DWORD ID;
    canMSGTYPE MSGTYPE;
    BYTE LEN;
    BYTE DATA[8];
    } CANMsg;
    myMsg.DATA ist a BYTE but i need to convert it to a char or QString.... in each order i have to hadle it in the GUI.
    I have the problem got a couple of days, and have no suitable solution up to now...

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Casting Byte to QChar or QString

    What have you tried in the last couple of days?

Similar Threads

  1. Replies: 2
    Last Post: 13th November 2013, 08:03
  2. From QString to QChar
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2009, 03:14
  3. convert BYTE* to QString
    By tpf80 in forum Qt Programming
    Replies: 6
    Last Post: 8th April 2007, 10:29
  4. Problem in converting QString to QChar array?
    By KaKa in forum Qt Programming
    Replies: 2
    Last Post: 19th March 2007, 00:38
  5. Q3PopUpmenu: Qchar * to QString
    By user_mail07 in forum Qt Programming
    Replies: 2
    Last Post: 1st February 2007, 20:33

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.