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. pybind11 / pyside2 / c++qt... oh dear
Forum Update on Tuesday, May 27th 2025

pybind11 / pyside2 / c++qt... oh dear

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 571 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.
  • D Offline
    D Offline
    Dariusz
    wrote on last edited by
    #1

    Hey

    I don't even know how to wrap my head around it but maybe some1 can help.

    I have a c++ app in Qt that has window/text editor, in that editor I'll put stuff like

    from PySide2.QtWidgets import *
    app = QApplication([""])
    w = QWidget()
    w.show()
    sys.exit(app.exec_())
    

    And run that inside pybind11/python... now great it works 1st time. 2nd time it crashes, but we can skip it for now... what I wonder is... should I pass my C++ QApplication to pybind11-python somehow so my pyside2 reuses existing application - thus allowing for the widgets to interact with each other ?

    If so, how ?

    Regards
    Dariusz

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

      Hi,

      You should provide a minimal compilable example showing your issue.

      There's an example of application making use of the two in this blog article.

      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
      • D Offline
        D Offline
        Dariusz
        wrote on last edited by
        #3

        Hey

        Sweet will check out that blog, post example too if I'm still stuck afterwards :- )

        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