如何正常关闭文件
我写的程序关闭文件的时候总是不正常也就是写东西,没有完全写进去就关闭了我也尝试了flush,但是没有用我看到文档中的解释是 aboutToClose(), then closes the device and sets its OpenMode to NotOpen. 即先发送一个信号aboutToClose()再关闭文档对aboutToClose()的解释是Connect this signal if you have operations that need to be performed before the device closes (e.g., if you have data in a separate buffer that needs to be written to the device).即需要在关闭之前执行某些操作的时候,发送这个信号。(写数据的时候)我感觉这就挺适合我现在程序的问题的!但是现在的问题是这个信号怎么用啊???怎么连接我的写操作呢??这个实在是不明白了还请教高手指点!!!