| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change fixes a few bugs and adds autotests for QGraphicsProxyWidget
and QGraphicsWidget's window flag handling. The former behavior has been
that you must set window flags on QGraphicsProxyWidget explicitly after
calling proxy->setWidget(); otherwise both the flags from the embedded
widget and the proxy would be partially ignored. Example:
QLineEdit *edit = new QLineEdit(0, Qt::Window); // that's the default
scene.addWidget(edit, Qt::Window); // proxy still has no window decos
proxy->setWindowFlags(Qt::Window); // now it got decorations :-/
QGraphicsWidget's window flags are immune to reparenting, and are always
polished with the necessary hints regardless of whether you set the
flags during construction time or later. This is a feature QGraphicsWidget
can provide because it allows toplevel widgets (without parents) to be
normal widgets (i.e., non-windows).
So the new behavior of QGraphicsProxyWidget is to respect its own window
flags and ignore those of the embedded widget, regardless of what flags
the embedded widget has when it's embedded. When QWidget auto-embeds
child windows (file dialogs, popups, etc), it passes the correct window
flags to the QGraphicsProxyWidget to ensure that the right flags are set.
Task-number: 251407
Reviewed-by: Joao
|