Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to embed PyQtGraph in QML with a PySide2 Python Backend?
Qt 6.11 is out! See what's new in the release blog

How to embed PyQtGraph in QML with a PySide2 Python Backend?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 2 Posters 2.3k Views 2 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.
  • Edwin F.E Offline
    Edwin F.E Offline
    Edwin F.
    wrote on last edited by
    #1

    Due to license restrictions I do not want to use QTCharts, so I am looking at PyQtGraph library.

    I am working with PySide2 and QML. I am having difficulty getting a simple example working using QML because I don't know where to start. How do I embed one of these charts from the Python/Pyside2 backend to the QML front end?

    Do I need to use a QQuickWidget somehow? Anyone have any examples of how to do this?

    Can someone please point me in the right direction? Thank you

    Edwin F.E 1 Reply Last reply
    0
    • Edwin F.E Edwin F.

      Due to license restrictions I do not want to use QTCharts, so I am looking at PyQtGraph library.

      I am working with PySide2 and QML. I am having difficulty getting a simple example working using QML because I don't know where to start. How do I embed one of these charts from the Python/Pyside2 backend to the QML front end?

      Do I need to use a QQuickWidget somehow? Anyone have any examples of how to do this?

      Can someone please point me in the right direction? Thank you

      Edwin F.E Offline
      Edwin F.E Offline
      Edwin F.
      wrote on last edited by
      #2

      @Edwin-F.

      I asked on S.O. and got this answer, apparently this is not possible to put a Widget in QML. So I am going a different route to solve this issue.

      "pyqtgraph is based on QGraphicsView which is part of the Qt Widgets submodule, so what you are asking for is equivalent to asking that a Qt Widget be embedded in QML and that is not possible. QQuickWidget does the opposite, ie embed a QML in a Qt Widget. In conclusion you can not."

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

        Hi,

        You may have some luck with KDAB's Declarative Widgets module.

        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
        • Edwin F.E Offline
          Edwin F.E Offline
          Edwin F.
          wrote on last edited by
          #4

          @SGaist

          Thanks Im looking into it

          1 Reply Last reply
          0

          • Login

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