Questions tagged [qdebug]

The QDebug class, part of the Qt framework, provides an output stream for debugging information.

Documentation can be found here

99 questions
3
votes
2 answers

QtCreator: qDebug Messages Not Shown

I am currently using QT Creator 3.2.1 with Qt 5.3.2 (as required by my current project) on Windows 7 (64 bits, Ultimate). I am currently working on a GUI project I am unable to see any qDebug messages in the Application Output window despite…
darkarn
  • 53
  • 1
  • 3
3
votes
1 answer

Printing qByteArray through qDebug

#include #include #include int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QByteArray dataReceivedFromSerialPort; dataReceivedFromSerialPort.push_back(0x0A); …
Aquarius_Girl
  • 21,790
  • 65
  • 230
  • 411
3
votes
2 answers

qDebug() doesn't print anything

I try to use Qt with CLion. My problem is that qDebug() doesn't print anything, but qInfo(), qWarning(), qCritical() and qFatal() works well. Here is my example code : #include #include int main(int argc, char *argv[])…
Hello
  • 161
  • 1
  • 7
3
votes
2 answers

qDebug and cout don't work

I have this simple code #include #include #include using namespace std; int main(int argc, char **argv) { cout << "pluto" << endl; QCoreApplication app(argc, argv); qDebug() <<…
lukigno
  • 31
  • 1
3
votes
4 answers

qDebug() doesn't support unicode strings on Windows

I have a line edit that contains a file name with Unicode-characters and it displays correctly in the GUI, but when I print it with qDebug(), it shows the Unicode symbols as question marks. For example, for "C:/Test/абв" this code will show only…
sashoalm
  • 75,001
  • 122
  • 434
  • 781
2
votes
1 answer

Qt enums comparison and output to QDebug

i am registering enums to the Qt meta-object system. i have double checked that all of those have a meta-type ID, and everything looks perfect. But i have some kind of unresolved issue with the comparison of those. Let's consider this code for…
Doodloo
  • 869
  • 5
  • 18
2
votes
1 answer

Qt and UTF-8: strange behaviour

To illustrate my problem I will give you an example: I have UTF-8 encoded text file. in.txt: ąśćź ąś ŻźŹ This program reads in.txt line by line and produces duplicate out.txt. It not only duplicates the file but also prints it to console. At the…
Maciej Ziarko
  • 11,494
  • 13
  • 48
  • 69
2
votes
3 answers

How to get QString qDebug output as string?

Let's have a look at this little application: #include #include int main(int argc, char *argv[]) { const auto test_string = QString{"Some string \n \x01 \u0002 with some \r special chars"}; qDebug() << test_string; …
FourtyTwo
  • 1,616
  • 2
  • 15
  • 43
2
votes
2 answers

QString formatting will not work qDebug

I try to avoid mixed QString and char* types in a QT program. I have a conversation function that returns a pointer of the data inside the QString, but I get very strange results. Whats wrong with this code? Compiler and environment gcc (Debian…
huckfinn
  • 644
  • 6
  • 23
2
votes
1 answer

Not seeing the output from qInfo()

New to QT, I've imported a project someone else made, and it compiles and runs on the MinGW version of QT Creator. But there's a small problem with it, that would be much easier to diagnose if I could see the debug output. There are lines all over…
GemmaB89
  • 165
  • 2
  • 16
2
votes
2 answers

Reading qDebug output of Apps on ios devices from command line

I am currently working on automated testing of Qt-Applications on devices running iOS. So far I am able to install and run these Applications fine, but I am unable to read their output. As far as I understood, reading this issue, Qt uses the gdb…
T3 H40
  • 2,326
  • 8
  • 32
  • 43
2
votes
1 answer

Wrong status when calling _exit(errno) from child

I'm calling execvp() with a deliberately wrong argument in a fork()'ed child. The errno number is properly set to ENOENT in the child process. I then terminate the child process with _exit(errno);. My main process calls wait(). When I inspect the…
CuriousMan
  • 101
  • 6
2
votes
1 answer

QVector Append truncating/rounding values

I am using QVector.append to append a double to QVector. Using my debugger, I can see that the double has a value of 40.783333499999998, however, the QVector values are rounded to 40.7833. Again, I see this on my debugger, not using qDebug so I'm…
french13
  • 75
  • 1
  • 7
2
votes
2 answers

std::cout gives different output from qDebug

I am using Qt, and I have an unsigned char *bytePointer and want to print out a number-value of the current byte. Below is my code, which is meant to give the int-value and the hex-value of the continuous bytes that I receive from a machine attached…
Admin Voter
  • 251
  • 1
  • 12