qdebug Questions

7

Solved

I'm using a lot of qDebug() << statements for debug output. Is there any cross-platform way I can redirect that debug output to a file, without resorting to shell scripts? I'm guessing that o...
Attune asked 10/2, 2011 at 6:42

9

Solved

Often when I need to debug something it's easier to print something using qDebug() instead of debugging step-by-step using a debugger. The problem is that from time to time the output of qDebug() ...
Honorine asked 9/10, 2012 at 12:6

11

Solved

I am trying to display a number using QDebug in the Hex format. Below is the code which I have written. It is working but the output has string contents enclosed in double quotes: How to remove th...
Stowaway asked 14/10, 2013 at 11:17

8

Solved

I'm using the the C++/Qt print function qDebug, but sometimes I would like to control how ", space and newline is appended and not use the default qDebug. Let's take a simple example: QString v...
Paranoiac asked 6/3, 2011 at 9:59

5

Solved

So when you use qDebug() to print a QString, quotation marks appears suddenly in the output. int main() { QString str = "hello world"; //Classic qDebug() << str; //Output: "hello world" /...
Pignus asked 16/1, 2015 at 2:54

5

Solved

In Qt Creator on Windows, qDebug() statements don't work, and the following message appears in the output window: Cannot retrieve debugging output. How can it be fixed?
Fodder asked 17/1, 2013 at 12:38

3

Solved

I disable the qDebug() messages by writing CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT in the .pro file. This works fine. I would like to know if there is any way to enable qDe...
Boyles asked 16/2, 2015 at 11:36

7

Solved

Is qDebug() thread-safe? By thread-safe I don't just mean not-crashing, but also if I call qDebug() from different threads, is it possible for the output to become mixed-up? I tested it with this c...
Isleen asked 20/3, 2014 at 8:25

1

Can qDebug() output the data in binary format? For example, I want to check some status variation: unsigned char status; ... qDebug() << "Status: " << status; I want to generate outp...
Sticktight asked 2/3, 2018 at 17:23

3

Solved

Coming from MFC, I treated qDebug() much like TRACE(), assuming that it is removed from Release builds by the preprocessor (in MFC it's done using #define TRACE 1 ? (void*) 0 : AfxTrace). To my su...
Tirol asked 21/11, 2012 at 13:37

6

Solved

Is there any easy way to get the following work? I mean is there any helper class in Qt which prepares the string for qDebug? QString s = "value"; qDebug("abc" + s + "def");
Tallia asked 25/8, 2013 at 8:44

4

Solved

I currently have a terribly annoying problem while developing programs using Qt and Qt Creator. Whenever I try using qDebug() with a QCoreApplication or QApplication instantiated before using qDebu...
Untangle asked 1/6, 2015 at 21:25

2

Solved

I am trying to use some vector data's name with struct. I am trying to get see which name in qDebug() To be more clear: const std::string& testName = "asdfqwer"; qDebug() << testName; ...
Crucial asked 8/12, 2014 at 13:13

4

When running my Qt5 application on linux, I don't see any output from qDebug, qWarning, qCritical or qFatal. I know that I can use qInstallMsgHandler to install a message handler and see them, but ...
Landlocked asked 10/10, 2014 at 8:44

2

Solved

I am using a qDebug() of Qt Framework for printf something on the screen. It works just fine when I run application from Qt Creator, but when I try to execute it from Windows cmd it shows nothing. ...
Gallaway asked 17/11, 2012 at 14:56

1

Solved

I have seen bits of Qt code that uses qDebug as if it were printf() qDebug( format, ... ); Mostly i see it used like std::cout qDebug() << "one " << var_one; What is the differenc...
Complaint asked 2/4, 2014 at 22:7

1

Solved

I cannot print out a QString in Qt using QDebug. Below are some attempts (none work): QDebug(letters.toStdString()); QDebug(letters.toLatin1()); QDebug() << letters.toUtf8(); QDeb...
Maund asked 20/1, 2014 at 11:34

2

Solved

How do I use qDebug in a Qt console application to output to the Qt Creator "application output" window? Currently qDebug writes to the console window which interferes with the non-debug output. U...

3

Solved

Sometimes I want to output a single line in qDebug(), but with some conditional text, like if (fontMetricsLeading < 0) qDebug() << "!!!"; qDebug() << fontMetricsLeading; However,...
Magee asked 18/11, 2012 at 7:11

1

Solved

I have a QByteArray to store data received from a GPS, which is part binary and part ASCII. I want to know for debug proposals know what's being received, so I'm writing a qDebug like this: //QByt...
Bonni asked 6/6, 2012 at 11:18
1

© 2022 - 2024 — McMap. All rights reserved.