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. Qt Console Application Window Resizeable
Forum Updated to NodeBB v4.3 + New Features

Qt Console Application Window Resizeable

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 4 Posters 3.4k Views 3 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.
  • DannyL408D Offline
    DannyL408D Offline
    DannyL408
    wrote on last edited by
    #1

    Hello,
    I am trying to make the console application window be resizeable or at least be able to adjust the width as it currently only allows adjustable height

    ? 1 Reply Last reply
    0
    • DannyL408D DannyL408

      Hello,
      I am trying to make the console application window be resizeable or at least be able to adjust the width as it currently only allows adjustable height

      ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi! Your console application runs within your operating system's terminal emulator. The window is owned by the terminal emulator. Your program can do nothing about it.

      1 Reply Last reply
      0
      • DannyL408D Offline
        DannyL408D Offline
        DannyL408
        wrote on last edited by DannyL408
        #3

        What would be the simplest way to be able to resize a Console application in windows then?

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          Just to be sure what we are talking about: You want to resize a window of cmd.exe?

          DannyL408D 1 Reply Last reply
          0
          • Paul ColbyP Offline
            Paul ColbyP Offline
            Paul Colby
            wrote on last edited by
            #5

            @DannyL408 said:

            What would be the simplest way to be able to resize a Console application in windows then?

            You can wrap it in a Windows cmd script, that does something like:

            mode con:cols=140 lines=70
            my-console-app.exe
            

            If you need to do it within the console application itself, you'll need to use Microsoft's Console Functions (obviously not portable), such as SetConsoleScreenBufferSize.

            Some further reading:

            • How to change Screen buffer size in Windows Command Prompt from batch script (Stack Overflow)
            • CMD: Set buffer height independently of window height (Stack Overflow)
            • tenox7/cmdmax/cmdmax.c (github)

            Good luck.

            Cheers.

            mrjjM 1 Reply Last reply
            1
            • ? A Former User

              Just to be sure what we are talking about: You want to resize a window of cmd.exe?

              DannyL408D Offline
              DannyL408D Offline
              DannyL408
              wrote on last edited by
              #6

              @Wieland
              I have Qt basic console application in release mode with the .exe that i would like to have a wider window with

              1 Reply Last reply
              0
              • Paul ColbyP Paul Colby

                @DannyL408 said:

                What would be the simplest way to be able to resize a Console application in windows then?

                You can wrap it in a Windows cmd script, that does something like:

                mode con:cols=140 lines=70
                my-console-app.exe
                

                If you need to do it within the console application itself, you'll need to use Microsoft's Console Functions (obviously not portable), such as SetConsoleScreenBufferSize.

                Some further reading:

                • How to change Screen buffer size in Windows Command Prompt from batch script (Stack Overflow)
                • CMD: Set buffer height independently of window height (Stack Overflow)
                • tenox7/cmdmax/cmdmax.c (github)

                Good luck.

                Cheers.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by mrjj
                #7

                Hi starting your .exe with a bat file as @Paul-Colby mentions is the fastest
                way to a bigger window.
                Tested on win 10.
                Not sure on win 7 as console window
                had strict ideas about available sizes :)

                1 Reply Last reply
                0
                • DannyL408D Offline
                  DannyL408D Offline
                  DannyL408
                  wrote on last edited by
                  #8

                  It seems i can just go to the properties of the .exe and edit the "layout"

                  mrjjM 1 Reply Last reply
                  1
                  • DannyL408D DannyL408

                    It seems i can just go to the properties of the .exe and edit the "layout"

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @DannyL408
                    Cool, where do u see such option ?

                    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