0

PyQt example

Is there an example python script that shows how to call PyQt?  I've created just a simple mode that seg faults when I create a QApplication.  We have :

>>> PyQt4.QtCore.QT_VERSION_STR
'4.5.3'
>>> PyQt4.QtCore.PYQT_VERSION_STR
'4.7.3'

Installed here and it works under python 2.6.  I am attempting to create the pyqt script in rv-4.0.7 in linux.  Thanks!

 

Jake




PyQtExample-1.0.rvpkg

5 条评论

  • 0
    Avatar
    Jon Morley

    Hi Jake,

    In order to use PyQt with RV you will need to compile against the same version of Python RV uses as well Qt version. For RV 4.0.7 You are looking for the version of PyQt that matches with Python version 2.6.7 and Qt version 4.8.2.

    I usually configure the PyQt build by using our included Python interpreter "py-interp" found alongside RV with each install.

    Thanks,
    Jon

  • 0
    Avatar
    Jake Richards

    Ah, I think I fixed it.  I didn't need to create a QApplication, I just needed to find the MainWindow app and create some dockwidgets under it.  Thanks!

     

  • 0
    Avatar
    Jon Morley

    Hi Jake,

    Here is a sample package that I used when testing PyQt. Please feel free to reference it as needed.

    Thanks,
    Jon

     

    Attached at top in original post.

  • 0
    Avatar
    Jake Richards

    Thanks Jon!  That was the example that I found when I searched a little more on the forums :)

     

    Jake

     

  • 0
    Avatar
    Jon Morley

    Terrific! I can never quite tell how discoverable things are here. Glad you were able to dig it up. Now there will be two paths to this information.

    Related post for those that come through here:
    https://support.shotgunsoftware.com/entries/96056447

请先登录再写评论。