[Interest] How to allow QML windows to come to foreground when clicked

McLin, Matthew matthew.mclin at barco.com
Mon Apr 7 18:10:41 CEST 2014


Hi all,

I am working on a QML application with wizard-style pages (drawn with a QQuickView), and occasionally it has to pop up some windows with images.  I would like the image windows to be "stand-alone", meaning they can float above or behind the wizard GUI depending on the user's preference.

I am using a Window object from "import QtQuick.Window 2.1", and the current behavior is that this image window is non-modal, (meaning keyboard focus remains with the wizard app, which is what I want), but the window is somehow fixed as top-most, in front of the other non-image window.  Clicking and dragging the non-image window around always makes it slide under the image window, whereas I want the non-image window to show in the foreground when I click on it.

I have tried setting and unsetting various window flags, and have tried the various modality enums, and none of these seem to give the result I want.  I also tried setting a "z" property for the Window, but it seems no such property exists.

Is there a way to bring QML windows to the foreground or change their Z-order?  Note that I'm not trying to steal focus from a different application - my app already has the focus.

Thanks, Matt

Matt McLin
Software Architect: Healthcare Division
Barco, Inc.

This message is subject to the following terms and conditions: MAIL DISCLAIMER<http://www.barco.com/en/maildisclaimer>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140407/215344e8/attachment.html>


More information about the Interest mailing list