Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to display line graph in QtTableWidget cells using Python?
Forum Updated to NodeBB v4.3 + New Features

How to display line graph in QtTableWidget cells using Python?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 506 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TonyB123
    wrote on last edited by
    #1

    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.com

    How on Earth would I do that? Thanks for your help.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What about rendering that graph in an image and just show the image in your cell ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • T Offline
        T Offline
        TonyB123
        wrote on last edited by
        #3

        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 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved