Results 1 to 2 of 2

Thread: Embedding PyQt4 into an Application running Python via Boost::Python

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Posts
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Embedding PyQt4 into an Application running Python via Boost::Python

    Hi,

    first of all, i hope i chose the right forum, but it thought i am having "installation" problems, so i might be right here.

    I'm developing an Application (which is Qt based itself) .. with Python integration using boost:ython.

    At first i want to mention that i don't have any problems running PyQt4 code using my native python interpreter /somewhere/Python26/Python.exe

    Now i try to have my script sourrounding understand pyqt4 so scripts can take usage of it. Unfortunatly i am getting

    ImportError: DLL load failed: The specified procedure could not be found.
    errors when i try to run python code like

    Qt Code:
    1. from PyQt4 import QtGui
    To copy to clipboard, switch view to plain text mode 
    .

    Qt Code:
    1. import PyQt4
    To copy to clipboard, switch view to plain text mode 
    or
    Qt Code:
    1. from PyQt4 import *
    To copy to clipboard, switch view to plain text mode 
    will pass without any errors, but not giving me access to anything inside the Module.

    I spent a few hours on investigation by now and couldn't find anything related so far, the most issues about PyQt + embedding are about sharing objects, not about the installation process itself.

    I guess i miss some setup required for my runtime python interpreter to know where to look for the dlls or something similar.

    My current application folder setup is like this:

    • Application.exe
    • boost_python-vc90-mt-1_41.dll
    • python26.dll
    • QtCore4.dll
    • QtGui4.dll
    • Qt.pyd
    • QtCore.pyd
    • QtGui.pyd
    • TestFile.txt


    I successfully read the TestFile.txt by reading "./TestFile.txt" via Python ... so the base path of the interpreter should find those modules as well?

    I also tried placing all *.pyd files from my PyQt4 installation inside the application folder to be sure its not a problem because the qt system is not complete.

    I've no idea how to get PyQt working inside my application and would be very grateful for any hint that might get me into the right direction.

    Thanks

    Gunnar
    Last edited by GreyHound; 12th April 2010 at 19:50.

Similar Threads

  1. PyQt4 app : high CPU usage from python and Xorg
    By tipote in forum Qt Programming
    Replies: 3
    Last Post: 30th January 2012, 17:50
  2. Embedding python code in Qt
    By lixo1 in forum Qt Programming
    Replies: 2
    Last Post: 12th March 2010, 18:02
  3. Replies: 1
    Last Post: 15th February 2010, 23:20
  4. communication between QT application and python
    By HERC in forum Qt Programming
    Replies: 2
    Last Post: 1st February 2010, 10:47
  5. Objective C, Python and Ruby code with C++ Qt application
    By Berberis in forum Qt Programming
    Replies: 2
    Last Post: 5th June 2008, 12:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.