[solved] Fullscreen confirm button



  • Hello
    I'm working with an embedded device that's running a -QT- Qt based software. The software uses layouts, and the screen is divided into several sections._My question is, can I make a "fullscreen confirm button" that overlaps the layout? Kinda similar to the windows admin privileges confirmation box that pops up when installing some software (vista & 7)

    http://www.maths.ox.ac.uk/files/imported/help/faqs/connection/vpn/vista11.png

    an ok and a cancel button with the surrounding background greyed down. Hopefully someone understands what I mean despite my awful explanation... :P

    My main concern is how to achieve this as I have layouts in use and it would have to overlap those. I'd appreiciate any suggestions. Thanks! Best regards
    Richard



  • Could you just create a new translucent fullscreen widget?
    http://doc.qt.nokia.com/qq/qq16-background.html



  • [quote author="reactive" date="1318949788"]Could you just create a new translucent fullscreen widget?
    http://doc.qt.nokia.com/qq/qq16-background.html[/quote]

    That would be the way to go.
    Or make a screen copy and then create a full screen widget and draw the pixmap greyed out on it.



  • Thank you for your replies, both ideas seem promising. One more newbie question though, how do I draw a widget on top of the layouts, either so that it covers part of the screen (still extending over different layouts) or as a fullscreen widget? Thank you!
    Richard



  • create the widget without parent (which implies a top level widget).
    call raise() and showFullscreen()
    Then create a dialog as child of this widget and show it.



  • Hello
    Clean and simple! Thanks! Just one more thing, won't this make the widget cover the whole screen? What if I want the box to appear at a certain location, thereby covering parts of the underlying main widget? Should I make the widget see trough, except for the parts where the actual data is located? and in that case, how can I set the alpha to the widget without affecting the actual content as well?

    Or does this relate to the "screenshot" principle"? so that I place a pixmap of the underlying widget as background in the new one?
    Is this the only way to "break" the layout borders? Or can I somehow else overlap these?

    Best regards
    Richard



  • the semi transparent top level widget covers the screen, so it looks like it is "darkened". It could also be top most (then raise is not needed).

    The dialog you put on top is a dialog. So it will not cover the whole screen by default. You need the parent to put it on top of the semi transparent widget.



  • the semi transparent top level widget covers the screen, so it looks like it is “darkened”. It could
    also be top most (then raise is not needed).

    But how do ignore the transparency on the actual buttons? (referring to the vista example, where the background is greyed but the buttons are "bright and solid".) Or do you mean that I show a orphan transparent widget as fullscreen as well as a dialog (meaning there are actually three layers)? Can I somehow control the position of the dialog?



  • [quote author="ThaRez" date="1319034845"]Or do you mean that I show a orphan transparent widget as fullscreen as well as a dialog (meaning there are actually three layers)? Can I somehow control the position of the dialog?[/quote]

    Yes, the dialog is on top of that widget, so you have 3 layers.



  • I wonder if all window managers allow non-fullscreen dialogs on top of a full-screen widget. Worth a try for sure, but I think this is not guaranteed to work. Also, you should wonder if you really, really need such an intrusive UI feature. You may think that your application is the most important in the world and that it deserves the users undivided attention, but your user may beg to differ. I, for one, do not like applications that try to force me to attend to them first before I do anything else.



  • I understand your concern for such a intrusive feature, and in most cases I'd agree. However in this case the UI is in an embedded device with limited functionality and at certain instances there will be situations were the full focus of the user is required, and this should be "intrusive". In my case the window manager in use is qws. My concern is, will I be able to place the top layer widget at a certain location? and completely remove the window frame? Note that there's no mouse nor keyboard attached to the system, but instead only five buttons with which the system is navigated.



  • should be possible. I know we did something similar in my last job, where we made Human Machine Interfaces for numercial controls.

    FullscreenWidgets should have no window frame.

    Positioning of child widgets is also possible.



  • In such constraint environments, there may indeed be very valid use cases for such a feature. You are posting in the General and Desktop forum though, so that was not immediately obvious to me.

    I have no idea if Qwt allows for this stuff. Just try and see :-)

    If you want to remove the window frame, you can either use window flags on your dialog or just not use a dialog at all but a normal widget parented to the semi-transparent base layer.



  • you're so right about the forum, didn't cross my mind that there was a more suitable one.. Anyway, thank you for your advice! Just one more thing, is it possible to control the location where the widget is opened? so that it could be placed at a certain point?
    Richard



  • Yes, you can use the setGeometry method on any QWidget.



  • Once more, thanks to everyone that helped me solve this issue!
    Best regards
    Richard


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.