simon stockes napisaĆ(a): > Hi, > > I have a gridlayout of QLabels. What it the signal to use in this > context to change, for exemple, the text from the QLabel I have > **clicked** ? > > I did not found **clicked()** signal for QGridlayout or QLabel.
AFAIK you have to do it yourself.
Here is how I do it (in C++). pressed() is a new signal in ImageLabel
which inherits QLabel:
void ImageLabel::mouseReleaseEvent( QMouseEvent *e)
{
if (e->button() != QMouseEvent::LeftButton)
{
QLabel::mouseReleaseEvent(e);
return;
}
if (this->rect().contains(e->pos()))
{
emit pressed();
}
}
HTH
Krzysztof Lichota
signature.asc
Description: OpenPGP digital signature
_______________________________________________ PyKDE mailing list [email protected] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
