Are you setting:
WSGIApplicationGroup %{GLOBAL}
in Apache configuration.
Graham
On 25 October 2011 23:25, Jaime Huerta Cepas <[email protected]> wrote:
> I'm getting problems with WSGI 3.3 and Qt4 applications. It seems that items
> of a QGraphicsScene cannot call the childItem() method. The following test
> script works well when called from the command line, but never finishes when
> called as WSGI application. I have noticed that this problem is present when
> using WSGI v3.3 but not with older (2.8) versions.
>
> childItems() method seem to hang and the application becomes unresponsive.
> WSGI is set to run as a daemon with 1 processes and 1 thread
>
> Any clue about what could be happening? Could it be a WSGI problem?
>
>
> environment (working): python 2.6.4, apache 2.2.14, mod-wsgi 2.8, qt 4.6.2,
> python-qt 4.7.2
> environment (problem): python 2.6.6, apache 2.2.16, mod-wsgi 3.3, qt 4.6.3,
> python-qt 4.7.3
>
>
>
> from PyQt4.QtGui import *
>
> import sys
> # Show print msgs in apache logs
> sys.stdout = sys.stderr
>
> import os
> # Allows apache to use DISPLAY. The command "xhost +" could be temporarily
> required to start Qt applications from the web server
> os.environ["DISPLAY"]=":0.0"
>
> QApp = None
> def application(environ, start_response):
> global QApp
> status = '200 OK'
> output = 'Hello World!'
> response_headers = [('Content-type', 'text/plain'),
> ('Content-Length', str(len(output)))]
> start_response(status, response_headers)
>
> qt_test()
>
> return [output]
>
> def qt_test():
> QApp = QApplication(["TEST"])
> scene = QGraphicsScene()
> obj = QGraphicsRectItem()
> scene.addItem(obj)
> print "EMPTY LIST", obj.childItems()
> obj2 = QGraphicsRectItem()
> obj2.setParentItem(obj)
> print "CHILDREN", obj.childItems()
> print "FINISH"
> return
>
> if __name__ == "__main__":
> qt_test()
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/modwsgi?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.