Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. QApp macro returns QtCoreApplication
QtWS25 Last Chance

QApp macro returns QtCoreApplication

Scheduled Pinned Locked Moved Language Bindings
4 Posts 3 Posters 5.4k Views
  • 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.
  • B Offline
    B Offline
    Benny
    wrote on last edited by
    #1

    Been using PyQt in a Qt based application that includes a python interpreter to create scripted tools with interfaces that integrate well with the base application.

    To do this i have been using QtGui.qApp to gain access to the running application in order to access the applications windows to insert my own interfaces.

    In PyQt this works fine and from qApp i get back the QtApplication instance, however when trying it with PySide i now get nothing back from the qApp macro so insted i try to use QtGui.QApplication.instance() and then i get a QCoreApplication back instead which does not give me any access to the widgets of the application.

    Any thoughts on why this may be?

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on last edited by
      #2

      Sounds like PyQt is nice and casts the QCoreApplication pointer to a QApplication pointer for you. For some reason PySide does not appear to be doing this. I do not know python so I am not sure if it is possible to do the cast yourself or not.

      Nokia Certified Qt Specialist
      Interested in hearing about Qt related work

      1 Reply Last reply
      0
      • L Offline
        L Offline
        luciano.wolf
        wrote on last edited by
        #3

        Maybe your problem is related to this bug: http://bugs.pyside.org/show_bug.cgi?id=816 . It was fixed today. If possible you can use the nightly build version: http://www.pyside.org/files/nightly/ - yes, it's bleeding edge :)

        1 Reply Last reply
        0
        • B Offline
          B Offline
          Benny
          wrote on last edited by
          #4

          looks promising, thanks for the heads up.

          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