Active Topics

 


Reply
Thread Tools
Posts: 129 | Thanked: 14 times | Joined on Dec 2009 @ Mboro - UK
#1
I'm starting out in pyQt but I'm really struggling to make my push buttons (8 in total) do anything.

All I want to start is press pushButton1 = play cow.mp3

Help
 
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#2
Qt and Audio not a good mix at the moment.
Use Pygame with Pyqt.

have a look at maesynth which is python. Download from HAM, and all source code is there
__________________
N900_Email_Options Wiki Page
 
Posts: 1,086 | Thanked: 2,964 times | Joined on Jan 2010
#3
Are you copying the code out of my tutorial? What kind of problem exactly are you facing, eg no sounds plays, error message, app fails to start?

it sounds like you've got your buttons on the GUI built ok, can you attach your files or paste the code in your main where the signals and slots are connected up?
__________________
Follow me on my neglected twitter @kojacker

Cybot950 - Control a robot with your N9/N950
SMSPetFeeder - Build a Bluetooth/SMS dog feeder with Qt, N950, and arduino
Nerf950 - Use your N9/N950 to fire a Nerf gun
 
Posts: 129 | Thanked: 14 times | Joined on Dec 2009 @ Mboro - UK
#4
I followed the fart app tut and that worked fine. But instead of selecting a sound/fart and then pressing a play button.

I just want press the cow button for moo sound. sheep for Baa etc.
 
atilla's Avatar
Posts: 1,210 | Thanked: 597 times | Joined on Apr 2010 @ hamburg,germany
#5
sounds interesting want such a app too.
do you use the keyboard?
good luck with that
__________________


Nobody likes us but we dont care....
 
Posts: 129 | Thanked: 14 times | Joined on Dec 2009 @ Mboro - UK
#6
No just the screen, it'll be for my 22month old son
 
atilla's Avatar
Posts: 1,210 | Thanked: 597 times | Joined on Apr 2010 @ hamburg,germany
#7
you are never too ld for some cow and sheep sounds
and btw:hes 22 months and I'm 22 years
__________________


Nobody likes us but we dont care....
 
Posts: 1,086 | Thanked: 2,964 times | Joined on Jan 2010
#8
Originally Posted by Keir View Post
I followed the fart app tut and that worked fine. But instead of selecting a sound/fart and then pressing a play button.

I just want press the cow button for moo sound. sheep for Baa etc.
Sure, it's a matter of rearranging the code.

I thought I'd try and give you a boost Ive made a simple project with two buttons, one that plays a cow mooooo and one a pig grunt grunt.. err grunt..



Ive zipped them up and attached them to the post. I hope you'll find it useful for your own project. To add more animals it's just a matter of adding more buttons to the gui, adding new methods (defs) to play the animal sounds in the main.py, and connecting the buttons to the methods (defs) in the main.py. If you open the main you'll see what I mean. Let us know how you get on

(As far as I'm aware, pics and wav files are copyright and royalty free.)

I wonder if there's any interest in making a full project out of this idea
Attached Files
File Type: zip maeFarm.zip (304.7 KB, 278 views)
__________________
Follow me on my neglected twitter @kojacker

Cybot950 - Control a robot with your N9/N950
SMSPetFeeder - Build a Bluetooth/SMS dog feeder with Qt, N950, and arduino
Nerf950 - Use your N9/N950 to fire a Nerf gun

Last edited by kojacker; 2011-06-26 at 10:48.
 
Reply


 
Forum Jump


All times are GMT. The time now is 23:10.