I tried that, creation and positioning works. But I cannot manage to set the focus on the created widget, setFocus() does nothing as the widget is a window. I'ts quite annoying for the user experience that the QLineEdit does not pop with focus.
Etienne Le vendredi 18 octobre 2013, André Somers a écrit : > > Try popping up a QLineEdit with parent set to 0, and call this on it: > myLineEdit->setWindowFlags(Qt::ToolTip | Qt::Window); > > You can also play around with other window flags of course. Obviously, you > will need to position the line edit before showing, relative to the widget > it is connected to. Take care that the coordinate system of a widget with a > parent is relative to its parent, while that of a a widget without a parent > is the global coordinate system. So, use QWidget::mapToGlobal from your > widget-that-needs-to-show-a-popup-line-edit to get its global coordinates. >
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest