How to change the text of QLineEdit while QTableWidget is being updating with data?
I'm creating a Qt application in which there is a QTableWidget and a QLineEdit. The QTableWidget is updated by a thread with lots of data and it takes time.While the QTableWidget is being updated QLineEdit becomes disable, unfortunately. Means user cannot change the text in QLineEdit until the QTableWidgit is updated. So, my question is that, is there a way with which user can change the text while the QTableWidget is being updated.
Re: How to change the text of QLineEdit while QTableWidget is being updating with dat
Where is QLineEdit placed ?
Re: How to change the text of QLineEdit while QTableWidget is being updating with dat
First of all you cannot update QTableWidget with a thread. If you want threading then use QTableView and a custom model that will receive data in the worker thread and pass it to the GUI thread through a signal.
If QLineEdit becomes "disabled" when the widget is updated then most likely it is not updated from within the thread but rather by the GUI thread.
You can read this paper to learn about some approaches to do it without threads: https://doc.qt.io/archives/qq/qq27-responsive-guis.html