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. What kinds of widgets can be larger than screen?
Forum Updated to NodeBB v4.3 + New Features

What kinds of widgets can be larger than screen?

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 1.0k Views 1 Watching
  • 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.
  • Y Offline
    Y Offline
    yetanotherqtfan
    wrote on last edited by
    #1

    When I resize a QWidget to be larger than screen, it only expands to the size of screen. But other QWidget-derived widgets such as QWebEngineView, can be larger than screen size. I wonder what kinds of widgets can be larger than screen, or is there some method/function I can use to set a widget larger than screen?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What OS ?
      If Linux, what window manager ?

      Depending on the window manager, you have some helper actions that will automatically resize your window to the screen.

      If you want to make it bigger:

      • By mouse, drag the window to be partly outside of the screen and continue to resize it.
      • By code, just set its size to what you want.

      Out of curiosity, why do you want to make your window explicitly bigger than your screen ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        yetanotherqtfan
        wrote on last edited by
        #3

        I'm on WIndows.

        I can not even drag the window larger than screen. The resize() function does not work, either.

        I want to take a full web page screenshot by calling the render function of the widget, and the full web page is larger than screen, so I need to resize the widget containing QWebEngineView to be larger than screen.

        jsulmJ 1 Reply Last reply
        0
        • Y yetanotherqtfan

          I'm on WIndows.

          I can not even drag the window larger than screen. The resize() function does not work, either.

          I want to take a full web page screenshot by calling the render function of the widget, and the full web page is larger than screen, so I need to resize the widget containing QWebEngineView to be larger than screen.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @yetanotherqtfan Maybe you could use https://doc.qt.io/qt-5/qwebenginepage.html#print instead of taking a screenshot?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          Y 1 Reply Last reply
          3
          • jsulmJ jsulm

            @yetanotherqtfan Maybe you could use https://doc.qt.io/qt-5/qwebenginepage.html#print instead of taking a screenshot?

            Y Offline
            Y Offline
            yetanotherqtfan
            wrote on last edited by
            #5

            @jsulm said in What kinds of widgets can be larger than screen?:

            @yetanotherqtfan Maybe you could use https://doc.qt.io/qt-5/qwebenginepage.html#print instead of taking a screenshot?

            the print function is used to print to a pdf, right? but I need to save to an image.

            jsulmJ 1 Reply Last reply
            0
            • Y yetanotherqtfan

              @jsulm said in What kinds of widgets can be larger than screen?:

              @yetanotherqtfan Maybe you could use https://doc.qt.io/qt-5/qwebenginepage.html#print instead of taking a screenshot?

              the print function is used to print to a pdf, right? but I need to save to an image.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @yetanotherqtfan said in What kinds of widgets can be larger than screen?:

              but I need to save to an image

              Take a look at https://forum.qt.io/topic/58570/print-or-take-a-screen-of-a-qwidget-in-order-to-put-it-in-a-qtextdocument/3
              You don't need a screenshot, just render your widget into a QPixmap and save it as a file.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              Y 1 Reply Last reply
              2
              • jsulmJ jsulm

                @yetanotherqtfan said in What kinds of widgets can be larger than screen?:

                but I need to save to an image

                Take a look at https://forum.qt.io/topic/58570/print-or-take-a-screen-of-a-qwidget-in-order-to-put-it-in-a-qtextdocument/3
                You don't need a screenshot, just render your widget into a QPixmap and save it as a file.

                Y Offline
                Y Offline
                yetanotherqtfan
                wrote on last edited by
                #7

                @jsulm said in What kinds of widgets can be larger than screen?:

                @yetanotherqtfan said in What kinds of widgets can be larger than screen?:

                but I need to save to an image

                Take a look at https://forum.qt.io/topic/58570/print-or-take-a-screen-of-a-qwidget-in-order-to-put-it-in-a-qtextdocument/3
                You don't need a screenshot, just render your widget into a QPixmap and save it as a file.

                I made a mistake, QWebEngineView can not be larger than screen, either. If the content of a web page is larger than the QWebEngineView widget, the QWebEngineView widget will have scroll bars. render() only saves part of the web page to image.

                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