![]() |
push button = play sound | how?
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 http://pixel-edge.net/images/other/s...dart/blush.gif |
Re: push button = play sound | how?
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 :) |
Re: push button = play sound | how?
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? |
Re: push button = play sound | how?
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. |
Re: push button = play sound | how?
sounds interesting want such a app too.
do you use the keyboard? good luck with that ;) |
Re: push button = play sound | how?
No just the screen, it'll be for my 22month old son http://pixel-edge.net/images/other/s...dart/smile.gif
|
Re: push button = play sound | how?
you are never too ld for some cow and sheep sounds;)
and btw:hes 22 months and I'm 22 years :) |
Re: push button = play sound | how?
1 Attachment(s)
Quote:
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.. http://i90.photobucket.com/albums/k2...016-165636.png 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 :cool: |
All times are GMT. The time now is 20:32. |
vBulletin® Version 3.8.8