How to create widget with clickable text in QT/PyQt?

Posted by serge on Stack Overflow See other posts from Stack Overflow or by serge
Published on 2010-04-29T00:39:22Z Indexed on 2010/04/29 10:07 UTC
Read the original article Hit count: 450

Filed under:
|
|

Hi everyone,

i'm trying to realize non-editable QTableView with widgets in cells that should contain clickable listed text. With following code i'm setting widget in definite cell:

view = QTableView()
label = QLabel( <some html text> )
...
view.setIndexWidget(index, label)

I used html to make label's text clickable, but links became blue with underline and moreover by clicking on it with right mouse button appears popup menu with "Copy Link Locaion" option, where i wanted to place some hidden information instead of url and of course do not let user see this info.

I'm looking for light-weight widget, i thought that insertion of QGraphicsView in each cell will lead to big computer loads, but can't think of any other solution.

Can you advice what should i use for this purpose?

Thank you in advance

Serge

© Stack Overflow or respective owner

Related posts about pyqt

Related posts about qt