well i have a QTableView with 5 columns, the first it is editable, i write the item number id inside the first column and the other are loaded by a sql query inside the model, the problem it is that to write the item number i am using a bar code reader so i can read 2~4 every second, the bar code reader send an return code after every read, i cant load the app now but i will attach some screenshot this night, the bar code are ean13 for example read this in column 1:
6361324116001 <--- complete ean13, return code it is send automatically
load the complete line and create new line and edit the first column other time to load other item. The problem i have it is that when you read too fast you will give anything like this in the qitemdelete qlineedit.
636132411600163613241160016361324116001
it is like the return code has not been sent and where the model execute the query this code does not exist (evidently), i have thought catch every 13 characters and do the work of create the new lines inside the model but i dont like the idea. I am using PyQt but i have profiled the application code and dont seem to be the problem, the problem seems to be in the qlineedit or QitemDelegate, and i am using the direct qt c++ class QItemDelegate without subclass it. When the application fails the cpu usage it is not over 60~75% (40~50 the app, 20~25 Xorg).
Bookmarks