How to display line graph in QtTableWidget cells using Python?
Unsolved
General and Desktop
-
wrote on 24 May 2018, 09:14 last edited by
Hi,
I'm new to QT and using the Windows desktop version. I'm able to use Qt Creator and Python to display the QtTableWidget with data plus use matplotlib to display a line graph in a separate window. What I want is to display line graph within the table cells, like this website
https://coinmarketcap.comHow on Earth would I do that? Thanks for your help.
-
Hi,
What about rendering that graph in an image and just show the image in your cell ?
-
wrote on 25 May 2018, 02:51 last edited by
Thanks, I got it working by using matplotlib to plot to canvas. Then converting this to a an rgb uint8 numpy array. Then converted to QImage that I could send to either a background brush or a QIcon to set a QTableWidgetItem to set to the QtTableWidget.
1/3