LINUX.ORG.RU

Qt: console application


0

1

I would not gonna bother you with my transliteration, so... I have a ready application written in Qt under windows platform using mingw. The problem is that when I start the program under windows, it opens a console which outputs all data etc... But when I compile it under linux - no console windows appear and I could not see any output.

How could I setup my project so the program will successfully open a new terminal and run beneath it?

Ответ на: комментарий от anonymous

you don't understand. I need the opposite effect, also I've googled it and no proper solution was found for me. += console does not help += testlib does not help

preepunk
() автор топика

Никак. Консольные приложения обычно запускаются из уже открытой консоли.

Можно, в принципе, создать .desktop-файл с опцией «Запускать в терминале», но не факт, что это будет работать во всех DE:

[Desktop Entry]
Type=Application
Name=My
Exec=./my
Terminal=true

Yareg ★★★
()
Ответ на: комментарий от preepunk

Приложение, само запускающее терминал, в который будет посылаться вывод? Знатное извращение. Индусским духом попахивает.

Эмуляторы терминалов у всех разные, подумай всё-таки над предложением Yareg.

baverman ★★★
()

How could I setup my project

Nohow. To achieve this you must change the application sources but not the project file. But beware, there is no such thing like «standard console» under linux. There are plenty of console emulators in linux. Gnome-terminal under gnome and konsole under kde (afaik) and many others.

I would reject this idea.

If you need console output use stdout or stderr in the application for output and start the program in a terminal emulator.

mi_estas
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.