numkeyboard->setWindowFlags(Qt::FramelessWindowHint | Qt::Popup); 使用Popup模态窗口打开 可以实现 点击窗口以外的部分时自动关闭窗口