Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Linux] QDebug doesn't work
Forum Updated to NodeBB v4.3 + New Features

[Linux] QDebug doesn't work

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    El3ctroGh0st
    wrote on last edited by
    #1

    Hello,

    I've recently made the switch to Linux (Ubuntu, Budgie Remix) and downloaded and installed Qt with the installer provided on their website. I've successfully managed to get Qt to run and I can also compile programs and run them. However, for some reason I can't use QDebug to print text. I don't get any error and the Qt window opens without problem, but the QDebug function doesn't seem to properly work for some reason. Is it possible that I need to install some additional dependency for that to work? Or what might I be missing? This is the program, but I don't think there is any error in there:

    #include "mainwindow.hpp"
    #include "ui_mainwindow.h"
    
    #include <QDebug>
    
    MainWindow::MainWindow(QWidget *parent) :
        QMainWindow(parent),
        ui(new Ui::MainWindow)
    {
        ui->setupUi(this);
    
        qDebug() << "Hello";
    }
    
    MainWindow::~MainWindow()
    {
        delete ui;
    }
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What version of Qt ? With which version of Qt Creator ?

      Take a look at QTBUG-65460

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      E 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        What version of Qt ? With which version of Qt Creator ?

        Take a look at QTBUG-65460

        E Offline
        E Offline
        El3ctroGh0st
        wrote on last edited by
        #3

        @SGaist Hello,
        I am using Ubuntu 17.10 and Qt 10.0.1. In the link you sent someone said that they should set "QT_LOGGING_TO_CONSOLE=1", but I'm a bit confused about where exactly to put that? Which tab in "Environment" do I need to select?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by SGaist
          #4

          If using Qt Creator, the Run part of the Project panel.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          E 1 Reply Last reply
          0
          • SGaistS SGaist

            If using Qt Creator, the Run part of the Project panel.

            E Offline
            E Offline
            El3ctroGh0st
            wrote on last edited by
            #5

            @SGaist Okay I just tried this. It sadly didn't fix the issue.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Are you using the Qt Creator provided with the installer ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • A Offline
                A Offline
                atomblender
                wrote on last edited by
                #7

                This helped me:

                https://stackoverflow.com/questions/30583577/qt-qdebug-not-working-with-qconsoleapplication-or-qapplication

                https://forum.qt.io/topic/54820/qt-qdebug-not-working-with-qconsoleapplication-or-qapplication/5

                1 Reply Last reply
                1

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved