V
V
Vi Vola2018-05-01 20:59:29
Qt
Vi Vola, 2018-05-01 20:59:29

QCoreApplication: why doesn't QDebug output work?

Below is a very simple code. Which should output first run, then pony. But only the first word is output.

#include <QCoreApplication>
#include <QDebug>

int main(int argc, char *argv[])
{
    qDebug() << "run";
    QCoreApplication a(argc, argv);
    qDebug() << "pony";
    return a.exec();
}

And in general, after the line QCoreApplication a (argc, argv) not only QDebug does not work, in my case QTCPServer also does not start.
pro file. Interestingly, the same code worked fine on a stationary computer. And I do all this on a laptop with Lubuntu. At my dacha I decided to finish the job) And earlier there was the newest qt from the official site. Already completely removed it and installed version 5.9.1 from the package manager.
QT += core
CONFIG += c++11
CONFIG += console
CONFIG += app_bundle
TEMPLATE = app
SOURCES += main.cpp

It seems to be a specific problem, I couldn't find an answer in Google. Maybe a problem with my hardware, I hope it's not.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jacob E, 2018-05-01
@Zifix

Isn't it?
https://forum.qt.io/topic/84550/qdebug-doesn-t-wor...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question