Qt中发送一个信号,slot函数没有完成,再发一个相同的信号会怎样
void CLabel::mousePressEvent(QMouseEvent *e)
{
if(e->button()==Qt::LeftButton)
{
setMousePressFlag(true);
emit signalLabelPress(this);
}
connect(label, SIGNAL(signalLabelPress(CLabel*)), this, SLOT(slotChangeCurrentPage(CLabel*)));
void DataBrain::slotChangeCurrentPage(CLabel *label)Qt c++ 信号 槽
{
int index = 0;
for (int i = 0; i < WINDOW_PAGE_COUNT; i++)
{
if (label == m_pLabelBtnArray[i])
{
index = i;
break;
}
}
if (index < m_currentFgIndex)
{
while(index != m_currentFgIndex)
{
m_currentFgIndex--;
moveCurrentPage(false);
}
}
else if (index > m_currentFgIndex) //点击右边的按钮 左移
{
while(index != m_currentFgIndex)
{
m_currentFgIndex++;
moveCurrentPage(true);
}
}
}