Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved] Fullscreen confirm button
QtWS25 Last Chance

[solved] Fullscreen confirm button

Scheduled Pinned Locked Moved General and Desktop
16 Posts 4 Posters 6.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    ThaRez
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • R Offline
      R Offline
      reactive
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • G Offline
        G Offline
        giesbert
        wrote on last edited by
        #3

        [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.

        Nokia Certified Qt Specialist.
        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

        1 Reply Last reply
        0
        • T Offline
          T Offline
          ThaRez
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #5

            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.

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply
            0
            • T Offline
              T Offline
              ThaRez
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              • G Offline
                G Offline
                giesbert
                wrote on last edited by
                #7

                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.

                Nokia Certified Qt Specialist.
                Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  ThaRez
                  wrote on last edited by
                  #8

                  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?

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    giesbert
                    wrote on last edited by
                    #9

                    [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.

                    Nokia Certified Qt Specialist.
                    Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      andre
                      wrote on last edited by
                      #10

                      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.

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        ThaRez
                        wrote on last edited by
                        #11

                        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.

                        1 Reply Last reply
                        0
                        • G Offline
                          G Offline
                          giesbert
                          wrote on last edited by
                          #12

                          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.

                          Nokia Certified Qt Specialist.
                          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            andre
                            wrote on last edited by
                            #13

                            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.

                            1 Reply Last reply
                            0
                            • T Offline
                              T Offline
                              ThaRez
                              wrote on last edited by
                              #14

                              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

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                andre
                                wrote on last edited by
                                #15

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

                                1 Reply Last reply
                                0
                                • T Offline
                                  T Offline
                                  ThaRez
                                  wrote on last edited by
                                  #16

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

                                  1 Reply Last reply
                                  0

                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Search
                                  • Get Qt Extensions
                                  • Unsolved