qt字符输入后发生中断
做一个类似QQ登陆的界面,login按钮开始时灰色的,只有在password里面输入字符后才变成enabled,于是就让password对应槽函数textchanged和对话框的enableloginbutton链接起来,程序中(如下)是loginbuttton就变成enabledvoid QQ::enableLoginButton(const QString &text)
{
loginButton->setEnabled(!text.isEmpty());
}但是运行却不是我想的这样,运行的时候在password里面输入之后却发生中断,中断处:
程序代码:bool QWidget::testAttribute_helper(Qt::WidgetAttribute attribute) const
{
Q_D(const QWidget);
const int x = attribute - 8*sizeof(uint);
const int int_off = x / (8*sizeof(uint));
return (d->high_attributes[int_off] & (1<<(x-(int_off*8*sizeof(uint)))));
}






