PDA

View Full Version : about qt debugger and file write



guchangyuan
28th July 2009, 02:51
1. i use qt creator, when in debug model , in the local variable watch area, can't get the value of the variable, in .pro file, i have added: CONFIG += debug

2. is there any api like ReadFile() in win32, can read .exe or .bin file and store the result in QString, then convert to byte and write to serial port.

nish
28th July 2009, 02:58
2. is there any api like ReadFile() in win32, can read .exe or .bin file and store the result in QString, then convert to byte and write to serial port.

just use QFile to open the exe file and use readAll() which will return QBytearray which you can directly put to serial port directly.