| Reference | Downloads | Github

Psychopy.gui breakout

Hi - I’m trying to build a CI calculator and wanted to keep it as simple as possible - so I thought using the PsychoPy GUI module would be best - is there a way to add buttons and keep the dialogue from being destroyed once a button is clicked, or will it be a case of delving into QtGui or wx in earnest?

Thanks in advance.


I think you’re going to want to use a gui library (like you mentioned, pyqt or wxPython).

The main reasons I would think this is that they’re designed to give you all the flexibility of a traditional gui library. You could use psychopy to do this, but I see very few benefits. For example, to create your own button, I think you’d have to create your own drawing, or use an image, position them yourself, and handle mouse clicks (I don’t think you can use psychopy’s gui module to do much of anything beyond showing the dialogs, and I assume this simplicity is by design for psychopy’s intended purpose.)

A gui library should give you easier ways to accomplish standard tasks. It would come with layout managers, you can easily get event information on things like mouse clicks (as well as drags, double-clicks, and right clicks, etc.). What if down the road you want a dropdown menu?

By my estimation it seems like psychopy is great for timing presentation of stimuli, for measuring reaction times, outputting data, etc. If you ever want to use a psychopy feature (like the clocks for timing things), you can simply import them like any other python module.

I would think it’s worth the time to learn a gui library if you want to make a traditional desktop gui. Thats my two cents

Great - thanks Dan. I was hoping to host the CL calculator within the environment (since all the dependancies are there already) rather than building it using PsychoPy - I’ll start looking into QtGui which I like the look of!