Qt Console Application Window Resizeable
-
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 heightHi! 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.
-
Just to be sure what we are talking about: You want to resize a window of cmd.exe?
-
@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.
-
Just to be sure what we are talking about: You want to resize a window of cmd.exe?
-
@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.
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 :) -
@DannyL408
Cool, where do u see such option ?