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. why am I getting this "qDebug (QString) error ?
Forum Updated to NodeBB v4.3 + New Features

why am I getting this "qDebug (QString) error ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 4 Posters 483 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    See the title

    91e7c904-9d26-4627-adcb-12906f234506-image.png

    KroMignonK 1 Reply Last reply
    0
    • A Anonymous_Banned275

      See the title

      91e7c904-9d26-4627-adcb-12906f234506-image.png

      KroMignonK Offline
      KroMignonK Offline
      KroMignon
      wrote on last edited by
      #2

      @AnneRanch Because the right way to do is qDebug() << line;

      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

      1 Reply Last reply
      1
      • goloviznin.kG Offline
        goloviznin.kG Offline
        goloviznin.k
        wrote on last edited by
        #3

        Hey, maybe you mean qDebug() << line ?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Anonymous_Banned275
          wrote on last edited by
          #4

          ???

          347c4fef-18e9-442e-a7b8-2790fb8d86a9-image.png 0d23d298-ac71-41c7-8171-27af15cc079d-image.png

          1 Reply Last reply
          0
          • Christian EhrlicherC Online
            Christian EhrlicherC Online
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #5

            As always - if you want to use a function you must include the header which defines it.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            3
            • A Offline
              A Offline
              Anonymous_Banned275
              wrote on last edited by
              #6

              Al always you cannot post without putting a person down

              Would somebody else kindly EXPLAIN why the qDebug(" " ) ; worked but
              qFebug() << did not.
              Thanks

              qDebug(" START int Form:: RunProcess_Asynch(QString Command, QStringList args )");
              qDebug()<<Command;
              qDebug()<<args;

              1 Reply Last reply
              0
              • Christian EhrlicherC Online
                Christian EhrlicherC Online
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Because qDebug() is a class which is defined in <QDebug> and qDebug(const char*) is a function defined in <QtGlobal>. So when you do not include the correct header, the compiler will not find the function/class - what's wrong with this statement here? Even the compiler tells you that the type is unknown to him but you kindly ignored the warning.

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                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