Skip to content
Advertisement

How to get row number and specify tooltip from another columns in that row?

the problem is that i can’t iterate through whole dataframe and for each cellwidgetitem in specific row in column 1 specify tooltip from another columns in the same row.

JavaScript

Above code works and does show whole dataframe in QTableWidget and below code works for extracting text from several columns and setToolTip for CellWidgetItem from row 1 and column 1. But when i get more than one hundred rows it would be such a long code to copy and specify manually for each cellWidgetitem from row 2,3,4,5…150 etc the tooltip.

JavaScript

I tried this code below to get it work but unfortunately i can’t.Nothing happens but it passes so that it has no errors? Please , give me a solution. Thank you very much.

JavaScript

Advertisement

Answer

For each item in column 1, I specify a tooltip that contains the info from the columns described below. I solved it like this:

JavaScript
Advertisement