小智 5
得到了坏消息和好消息.坏消息是它根本没有实现.
好消息是:由于Qt是开源的,你可以打开它并看一看就知道了.如果有错误,您可以提交修复程序.这是交易,在qwidget.cpp的通用代码QWidget::setWindowFlags中
:9144你有这个:
void QWidget::setWindowFlags(Qt::WindowFlags flags)
{
if (data->window_flags == flags)
return;
Q_D(QWidget);
if ((data->window_flags | flags) & Qt::Window) {
// the old type was a window and/or the new type is a window
QPoint oldPos = pos();
bool visible = isVisible();
setParent(parentWidget(), flags);
// if both types are windows or neither of them are, we restore
// the old position
if (!((data->window_flags ^ flags) & Qt::Window)
&& (visible || testAttribute(Qt::WA_Moved))) {
move(oldPos);
}
// for backward-compatibility we change Qt::WA_QuitOnClose attribute value only when the window was recreated.
d->adjustQuitOnCloseAttribute();
} else {
data->window_flags = flags;
}
}
Run Code Online (Sandbox Code Playgroud)
所以基本上它只是设置window_flags.QWidget的mac行为在qwidget_mac.mm中.
你将Qt::WindowStaysOnBottomHint在该文件中找不到任何引用.(你会发现Qt::WindowStaysOnTopHint......)
我会停止说"除非你要么补Qt,否则不要去Qt",否则"不可能".
补丁qwidget_mac.mm留给读者作为练习.:-)
| 归档时间: |
|
| 查看次数: |
571 次 |
| 最近记录: |