Is it possible to create custom PyQt4 Slots, i have searched high and
low to no avail;
I have an application that can set animation speed to different
levels, i want the user to alter this, now quite clearly i can write a
single function to control setting any speed with something like:
def setSpeed(self, speed):
some code in here to set speed
but if i have mutiple option for speed do i have to connect them all
to seperate callables for each individual speed which each in turn
call setSpeed with their respective speeds or can i create a slot that
can simply pass an integer to setSpeed in much the same way as the
built-in SIGNAL from something like a combo box can pass its current
index??
i realise this could be impossibly, knowing that would be equally
useful and i will just work around it, albeit with more verbose code!!
thanks
ff 3 2472
ff schrieb:
Is it possible to create custom PyQt4 Slots, i have searched high and
low to no avail;
I have an application that can set animation speed to different
levels, i want the user to alter this, now quite clearly i can write a
single function to control setting any speed with something like:
def setSpeed(self, speed):
some code in here to set speed
but if i have mutiple option for speed do i have to connect them all
to seperate callables for each individual speed which each in turn
call setSpeed with their respective speeds or can i create a slot that
can simply pass an integer to setSpeed in much the same way as the
built-in SIGNAL from something like a combo box can pass its current
index??
i realise this could be impossibly, knowing that would be equally
useful and i will just work around it, albeit with more verbose code!!
http://docs.huihoo.com/pyqt/pyqt4.ht...and-qt-signals
"""
PyQt allows new signals to be defined dynamically. The act of emitting a
PyQt signal implicitly defines it. PyQt v4 signals are also referenced
using the QtCore.SIGNAL() function.
"""
Work on your google-fu...
Diez
Diez B. Roggisch schrieb:
ff schrieb:
>Is it possible to create custom PyQt4 Slots, i have searched high and low to no avail;
I have an application that can set animation speed to different levels, i want the user to alter this, now quite clearly i can write a single function to control setting any speed with something like:
def setSpeed(self, speed): some code in here to set speed
but if i have mutiple option for speed do i have to connect them all to seperate callables for each individual speed which each in turn call setSpeed with their respective speeds or can i create a slot that can simply pass an integer to setSpeed in much the same way as the built-in SIGNAL from something like a combo box can pass its current index??
i realise this could be impossibly, knowing that would be equally useful and i will just work around it, albeit with more verbose code!!
http://docs.huihoo.com/pyqt/pyqt4.ht...and-qt-signals
"""
PyQt allows new signals to be defined dynamically. The act of emitting a
PyQt signal implicitly defines it. PyQt v4 signals are also referenced
using the QtCore.SIGNAL() function.
"""
And not to forget:
"""
A slot is a function (in PyQt a slot is any Python callable).
"""
It's as easy as it can get.
Diez
On Aug 11, 9:56*pm, "Diez B. Roggisch" <de...@nospam.web.dewrote:
Diez B. Roggisch schrieb:
ff schrieb:
Is it possible to create custom PyQt4 Slots, i have searched high and
low to no avail;
I have an application that can set animation speed to different
levels, i want the user to alter this, now quite clearly i can write a
single function to control setting any speed with something like:
def setSpeed(self, speed):
* * *some code in here to set speed
but if i have mutiple option for speed do i have to connect them all
to seperate callables for each individual speed which each in turn
call setSpeed with their respective speeds or can i create a slot that
can simply pass an integer to setSpeed in much the same way as the
built-in SIGNAL from something like a combo box can pass its current
index??
i realise this could be impossibly, knowing that would be equally
useful and i will just work around it, albeit with more verbose code!!
http://docs.huihoo.com/pyqt/pyqt4.ht...and-qt-signals
"""
PyQt allows new signals to be defined dynamically. The act of emitting a
PyQt signal implicitly defines it. PyQt v4 signals are also referenced
using the QtCore.SIGNAL() function.
"""
And not to forget:
"""
A slot is a function (in PyQt a slot is any Python callable).
"""
It's as easy as it can get.
Diez
Sorry, yeah getting confused between SIGNALS and SLOTS, thanks This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Harshad |
last post by:
Hi,
I'm writing a program using Python 2.4 and PyQt4. The aim is to
implement drag and drop from filesystem and display a list of files
dragged...
|
by: Skink |
last post by:
Hi,
I created simple property classes with editing option, but since i'm not
too much experienced in PyQt4 i'd like to ask if i handle...
|
by: Tina I |
last post by:
I'm trying to 'convert' my self from Qt3 to Qt4 (it rocks!) and one
thing seem strange:
With Qt3 I usually did "from qt import *", but this does...
|
by: Daniel Jonsson |
last post by:
So, I've reached the point where my building pipeline tools actually
needs to be used by other people in my company. By this reason I
actually need...
|
by: AngelOfDarkness |
last post by:
Hi guys,
unfortunately I am pretty new to Python and Qt and all that. Well, I managed to successfully program a little stuff for my work...
|
by: Pradnyesh Sawant |
last post by:
Hello,
I have a newly installed ubuntu 6.06 system. I am trying to install
pyqt4 on it, but without success. The contents of the...
|
by: jiang.haiyun |
last post by:
Hi,
I am having some serious problems with PyQT4,
when i run pyqt script, I always get 'Segmentation fault'.
the script is simple:...
|
by: Phil Thompson |
last post by:
On Sunday 04 May 2008, Lance Gamet wrote:
I think QMainWindow.setCentralWidget() is what you are looking for.
The eric4 IDE probably covers...
|
by: Bighead |
last post by:
I remember when I did UI Design in PyQt4 for the first time, I found a
manual. In it, no "connect" was used. Instead, an OO approach is
applied,...
|
by: tammygombez |
last post by:
Hey fellow JavaFX developers,
I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
|
by: tammygombez |
last post by:
Hey everyone!
I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
|
by: concettolabs |
last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
|
by: teenabhardwaj |
last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
|
by: CD Tom |
last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
|
by: jalbright99669 |
last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
|
by: Matthew3360 |
last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
| |