• 5363阅读
  • 5回复

怎样让子窗口一直保留在父窗口前面? [复制链接]

上一主题 下一主题
离线jacktiger
 
只看楼主 倒序阅读 楼主  发表于: 2009-06-24
现在都是用show的方法,但一点父窗口,子窗口就跑后面去了。QT有没有类似于showmodal的方法。
另外QMdiArea是怎么控制各个子窗口的?请有经验的简单说明一下。
离线feiying888

只看该作者 1楼 发表于: 2009-06-24
int QDialog::exec ()   [slot]

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

If the dialog is application modal, users cannot interact with any other window in the same application until they close the dialog. If the dialog is window modal, only interaction with the parent window is blocked while the dialog is open. By default, the dialog is application modal.

See also open(), show(), result(), and setWindowModality().
离线jacktiger
只看该作者 2楼 发表于: 2009-06-24
我还有一个问题,我现在一拽子窗口就出了父窗口范围了,这个有办法控制吗?
离线浪漫天使
只看该作者 3楼 发表于: 2009-06-24
干脆 用QStackedWidget  算了。
离线jacktiger
只看该作者 4楼 发表于: 2009-06-25
多谢楼上。抽空研究一下。现在只是觉得有点别扭,倒是不影响机能。
离线pathtonorth
只看该作者 5楼 发表于: 2009-06-26
void QWidget::raise ()   [slot]
Raises this widget to the top of the parent widget's stack.

After this call the widget will be visually in front of any overlapping sibling widgets.
快速回复
限100 字节
 
上一个 下一个