最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

qt - QApplication in Visual Studio 2022 console not showing - Stack Overflow

matteradmin7PV0评论

I have a "console" application that depends on a lib which uses QPixmap. Therefore the application crashes if I initialize it with QCoreApplication. So instead I have to use QApplication to initialize the application. I don't even know if this causes my problem. In the Visual Studio 2022 Linker Settings I set the target system to "console" (/subsystem:console) The application starts and everything, but I wanted the console window to show up, so that I can display qInfo() information for the admin in the console. But for any unkown reason the console is'nt showing up. I only get the "Debugger-Console" inside Visual Studio but not the "execution" console.

Does anyone of you know what settings to change to get the console visible?

Using: VS2022 with Qt 6.4.2 x64

The lib (smh) uses QPixmap, for some reason the SmartServ-app will cause a runtime crash when initialized with QCoreApplication, but works fine when initializing with QApplication, just in case this might be reason for the strange behaviour.

I have a "console" application that depends on a lib which uses QPixmap. Therefore the application crashes if I initialize it with QCoreApplication. So instead I have to use QApplication to initialize the application. I don't even know if this causes my problem. In the Visual Studio 2022 Linker Settings I set the target system to "console" (/subsystem:console) The application starts and everything, but I wanted the console window to show up, so that I can display qInfo() information for the admin in the console. But for any unkown reason the console is'nt showing up. I only get the "Debugger-Console" inside Visual Studio but not the "execution" console.

Does anyone of you know what settings to change to get the console visible?

Using: VS2022 with Qt 6.4.2 x64

The lib (smh) uses QPixmap, for some reason the SmartServ-app will cause a runtime crash when initialized with QCoreApplication, but works fine when initializing with QApplication, just in case this might be reason for the strange behaviour.

Share Improve this question asked Nov 18, 2024 at 12:11 Der AchimDer Achim 907 bronze badges 1
  • If it's for QPixmap only, you can also use QGuiApplication, as you don't probably need the whole desktop related aspects of QApplication. – musicamante Commented Nov 18, 2024 at 17:28
Add a comment  | 

1 Answer 1

Reset to default 1

I found the solution. I was looking up the wrong project configuration. Setting to subsystem:console works just fine.

Post a comment

comment list (0)

  1. No comments so far