Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-92092

Monitor scale change and showFullScreen

    XMLWordPrintable

    Details

    • Platform/s:
      Windows

      Description

      Dear community,
      I was playing today with the dprgadget from Qt sources, and I added a call to showFullscreen on the widget. I my opinion, if scale change even the window is already open, it should react and adapt to stay in full screen like almost every maximized window. 

       

      int main(int argc, char **argv){  
      QApplication app(argc, argv);  
      DprGadget dprGadget;  
      dprGadget.showFullScreen(); // We expect this size to be preserved across screen and DPI changes 
      return app.exec(); }
      

      EDIT: After investigation, replacing showFullscreen by this did the trick but it's kind of manual way

      QObject::connect(windowHandle()->screen(), &QScreen::availableGeometryChanged, [=](){
                  setGeometry(windowHandle()->screen()->geometry());
              });
      

       

        Attachments

        1. Initial-1.png
          Initial-1.png
          16 kB
        2. Initial.png
          Initial.png
          31 kB
        3. Decrease.png
          Decrease.png
          115 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            romaincendre Romain Cendre
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes