PDA

View Full Version : pushButton click event



aj2903
9th June 2009, 12:06
hii..
I'm facing difficulty while using pushbutton click Event.
Here is the code:


connect(ui.pushButton, SIGNAL(clicked()), this, SLOT(some_slot()));


I want the function to be access when the some_flag is TRUE;
The flag is set TRUE else where in the code & initially the flag is FALSE.
How can it be done?

spirit
9th June 2009, 12:19
I'm not sure that I understand what your question properly, but maybe this can help


void MyWidget::some_slot()
{
if (!m_someFlag)
return;
...
}