PDA

View Full Version : qtablewidget problem



prabhudev
27th August 2012, 09:41
8152
hi,I am facing a problem with qtablewidget..its a sniffer project..it reads data from Ethernet interface and updates table in realtime..the problem is its displaying box like character at the end...i have attached a screenshoot...I have checked with qtableview also, i faced same problem...but the same code works fine with qtable(qt3). please help

ChrisW67
27th August 2012, 10:10
What screen shot?

prabhudev
27th August 2012, 10:14
i have attached image...check

ChrisW67
27th August 2012, 10:16
You are putting a character in the cell that does not have a glyph in the current font. How is the data sourced? What exactly is going in the cell?

prabhudev
27th August 2012, 10:31
qstring... get data from socket... using setitem i insert in cell... when i run the same code using qtable(qt3) it works fine..when i use qtablewidget the cell content shows the box like character...and if i use qtabe(qt3) the cell shows null or empty which is correct...because it should show empty for that column..

ChrisW67
27th August 2012, 23:12
I will ask again: What exactly is going in the cell? What bytes are you getting in the socket that you are mangling into a QString and then stuffing into a QVariant? This is the problem, not the table widget.