Hi every body!
i want to know when my label is selected with user my code is this but doesn't work
class ImageLabel
: public QLabel{
Q_OBJECT
public:
signals:
void selected();
protected:
};
{
if(eve->button() == Qt::LeftButton)
{
emit selected();
}
}
class ImageLabel : public QLabel
{
Q_OBJECT
public:
ImageLabel(QWidget* parent=0);
signals:
void selected();
protected:
void mousePressEvent( QMouseEvent* event );
};
void ImageLabel::mousePressEvent (QMouseEvent* eve)
{
if(eve->button() == Qt::LeftButton)
{
emit selected();
}
}
To copy to clipboard, switch view to plain text mode
program compiled but after clicking label doesn't happened everything
Bookmarks