I am creating an interface using Qt. I added a button and when it comes up with the mouse I see the QLabel and ask for information.(Button will not be clicked) How can I do it.
I wrote following code. But, not view ui->checkout button. I want to view CheckoutButton.
mainwindow.h
public:
explicit PRJSVN(QWidget *parent=0);
~PRJSVN();
bool eventFilter(QObject *obj, QEvent *e);
mainwindow.cpp
PRJSVN::PRJSVN(QWidget *parent):
QMainWindow(parent),
ui(new Uİ::PRJSVN)
{
ui->setupUi(this);
ui->CheckoutButton->installEventFilter(this);
}
bool PRJSVN::eventFilter(QObject *obj, QEvent *e)
{
if(obj==(QObject*)ui->CheckoutButton)
{
if(e->type()==QEvent::Enter)
{
ui->label->SetText("Checkout Button");
}
}
return QWidget::eventFilter(obj,e);
}