Good afternoon. Such problem: the function opens the file, creates a thread, reads from it a string and returns. Data are recorded in a TreeWidget. And so to the end. Then the file is closed.
Created a button in the app, which first clears TreeWidget (tested, all works correctly), and the second calls the function above.
When the application is started, all normal reads and writes in the TreeWidget. Then I open the file in which the data lie, change a couple of lines, save and close. Press the button and nothing happens. When you launch the app again, all changes become visible. Please help. Here is the code:
QString line = m_stream.readLine();
m_stream is created in another function, there is bound to the file.
As I said above, after the completion of this function, the file I close.