No output from qDebug in run tool subwindow

Hartmut Riesenbeck hriesenb at uos.de
Thu Jun 14 14:31:01 BST 2018


Am Donnerstag, 14. Juni 2018, 13:42:36 CEST schrieb Kevin Funk:
> On Thursday, 14 June 2018 13:02:50 CEST Hartmut Riesenbeck wrote:
> this is odd. Can you share the source code of the project where this is
> happening? Does it happen for all CMake-based projects for you?
> 

Heya Kevin,

I noticed this behavior in all my other CMake-based projects. I created 
already a little test project which shows the problem.

-- CMakeLists.txt --------------------------

cmake_minimum_required(VERSION 2.8.11)
project(qdebug_test)
find_package(Qt5Core CONFIG REQUIRED)
add_executable(qdebug_test qdebug_test.cpp)
target_link_libraries(qdebug_test Qt5::Core)

---------------------------------------------------

-- qdebug_test.cpp -----------------------

#include <QtGlobal>
#include <iostream>

int main()
{
    qDebug("Hello word from qDebug!");
    std::cout << "Hello word from std::cout!" << std::endl;
    std::cerr << "Hello word from std::cerr!" << std::endl;
    return 0;
}

---------------------------------------------------

Cout and cerr output is printed and qDebug not. This behavior is shown on all 
three machines I work on (openSUSE Tumbleweed).

Regards,
Hartmut






More information about the KDevelop mailing list