PDA

View Full Version : mouse event not working in buttons



meenu
22nd August 2011, 07:30
mouse click worked in central widget ,but not working in buttons??





void DotsDeluxe::mousePressEvent(QMouseEvent *e)
{
if(e->button()==Qt::LeftButton)
{

QPixmap* pixmaptw = new QPixmap(":/Images/ccursor0.png");
ui->centralWidget->setCursor(QCursor (*pixmaptw,0,0));


}

}

wysota
22nd August 2011, 09:39
Define "not working".

Rachol
22nd August 2011, 10:52
ui->centralWidget->setCursor(QCursor (*pixmaptw,0,0));

Are you sure this belongs to what I assume is the code for your buttons?
Are you sure it is not working?