默认窗口是显示的,
我先用isVisible ( )判断窗口是否显示,
用来隐藏窗口的函数是 setVisible(false),
尝试用过hide( ),隐藏正常,可还是没办法显示。
是不是当时键盘输入的focus不在窗口上的原因呢?
但是
-------------------------
void QWidget::setFocus ( Qt::FocusReason reason )
Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the active window. The reason argument will be passed into any focus event sent from this function, it is used to give an explanation of what caused the widget to get focus.
Be aware that if the widget is hidden, it will not accept focus until it is shown.
----------------------------------------
看起来,是行不通的。
如果不是活动窗口,应该是接受不了快捷键的吧?
[ 此贴被bingogo在2008-10-20 16:49重新编辑 ]