我怎么能防止主窗口变暗,即使按钮单击事件也需要很长时间才能响应。
例如:文件 myframe.h
class MyFrame : public QFrame
{
Q_OBJECT
public:
explicit MyFrame(QWidget *parent=0);
~MyFrame();
void mousePressEvent(QMouseEvent * event);
void mouseReleaseEvent(QMouseEvent *event);
private:
Ui::MyFrame *ui;
}
file myframe.cpp
MyFrame::MyFrame(QWidget *parent):
QFrame(parent),ui(new Ui::FerryFrame)
{
ui->setupUi(this);
}
void MyFrame::mouseReleaseEvent(QMouseEvent *event)
{
// do something cost long time,
// this will make the frame background becomes dim,
}
MyFrame::~MyFrame()
{
}
有什么解决办法吗?
谢谢,约翰