Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. qwindowgeometry not working as command line option
Qt 6.11 is out! See what's new in the release blog

qwindowgeometry not working as command line option

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
6 Posts 2 Posters 111 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.
  • R Offline
    R Offline
    Robert Hairgrove
    wrote last edited by
    #1

    Whether I try to open Qt Creator or other tools (linguist, for example) passing an argument -qwindowgeometry or just geometry isn't working for me. I am running Linux Ubuntu 24.04 on Xorg with GNOME, and this is with Qt Creator 19 and Linguist from Qt 6.11.0.

    I would like to open linguist maximized, but it doesn't seem to remember from the previous session that I had maximized the window, so I try setting the geometry to a size which is just a little smaller than the actual screen dimensions -- which on my laptop are 1920x1200 pixels or 16:10 aspect ratio. Here are two screenshots which illustrate the problem:
    Qt_linguist_qwindowgeometry_01.png
    Qt_linguist_qwindowgeometry_02.png
    As you can see from the second screenshot, the linguist window opens at the bottom left area of the screen and is nowhere near filling out the size requested.

    Do I need to set some environment variable to get this to work? Or is it just ignoring the value, in spite of the command line help saying otherwise?

    JonBJ 1 Reply Last reply
    0
    • R Robert Hairgrove

      Whether I try to open Qt Creator or other tools (linguist, for example) passing an argument -qwindowgeometry or just geometry isn't working for me. I am running Linux Ubuntu 24.04 on Xorg with GNOME, and this is with Qt Creator 19 and Linguist from Qt 6.11.0.

      I would like to open linguist maximized, but it doesn't seem to remember from the previous session that I had maximized the window, so I try setting the geometry to a size which is just a little smaller than the actual screen dimensions -- which on my laptop are 1920x1200 pixels or 16:10 aspect ratio. Here are two screenshots which illustrate the problem:
      Qt_linguist_qwindowgeometry_01.png
      Qt_linguist_qwindowgeometry_02.png
      As you can see from the second screenshot, the linguist window opens at the bottom left area of the screen and is nowhere near filling out the size requested.

      Do I need to set some environment variable to get this to work? Or is it just ignoring the value, in spite of the command line help saying otherwise?

      JonBJ Online
      JonBJ Online
      JonB
      wrote last edited by JonB
      #2

      @Robert-Hairgrove said in qwindowgeometry not working as command line option:

      an argument -qwindowgeometry

      Let's start with: the help tells you the argument is --qwindowgeometry. So either you are not passing that or you have told us incorrectly what you are passing?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Robert Hairgrove
        wrote last edited by
        #3

        Please look at the bottom of the first screenshot ... this is what I did (command is underlined in red).

        1 Reply Last reply
        0
        • JonBJ Online
          JonBJ Online
          JonB
          wrote last edited by
          #4

          If you were using Wayland (default for Ubuntu GNOME) I would not be surprised. If you are sure you are using Xorg then that is not applicable.

          1920 wide for a window seems too large for your desktop. FWIW why don't you test it with, say, 1300x900+100+100 so you know whether it is ignoring or respecting anything? That is what I would do. Having said that I don't know what the problem is, just suggesting basic stuff.

          R 1 Reply Last reply
          0
          • JonBJ JonB

            If you were using Wayland (default for Ubuntu GNOME) I would not be surprised. If you are sure you are using Xorg then that is not applicable.

            1920 wide for a window seems too large for your desktop. FWIW why don't you test it with, say, 1300x900+100+100 so you know whether it is ignoring or respecting anything? That is what I would do. Having said that I don't know what the problem is, just suggesting basic stuff.

            R Offline
            R Offline
            Robert Hairgrove
            wrote last edited by
            #5

            @JonB When I enter this in the terminal:

            echo $XDG_SESSION_TYPE
            

            it says:

            x11
            

            I think I tried the suggestion to use smaller coordinates, but it didn't matter, if I remember correctly.

            JonBJ 1 Reply Last reply
            1
            • R Robert Hairgrove

              @JonB When I enter this in the terminal:

              echo $XDG_SESSION_TYPE
              

              it says:

              x11
              

              I think I tried the suggestion to use smaller coordinates, but it didn't matter, if I remember correctly.

              JonBJ Online
              JonBJ Online
              JonB
              wrote last edited by JonB
              #6

              @Robert-Hairgrove
              Fair enough. If it were me I would try a quick one line Qt GUI program of my own to see whether it respects --qwindowgeometry (that's one of the command line arguments any Qt program picks up), plus save/restore if you're wanting to check that, to see where you start from.

              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