4

I'm debugging a huge Qt app with hundreds of classes, messy code, etc. While tracking down a bug, I want to single-step in gdb (kdbg, ddd, whatever) while watching what gets drawn into a QImage using a QPainter that's carried about from method to method. Somewhere, it's doing being given bad information. Normally all I can get is the final QImage written to a .png file.

Is there some way to see what the image is in a QImage when stopped in a debugger?

BTW, this is using Qt4.3, which is kinda old but we're stuck with for now. If a newer Qt offers some advantage, I have ways to hack with it (as well as others seeing this question may have the latest).

DarenW
  • 16,549
  • 7
  • 63
  • 102

1 Answers1

5

That's one of the examples in the Peek and Poke, Vol. 3 article on Qt Labs blog.

sashoalm
  • 75,001
  • 122
  • 434
  • 781
Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366
  • Somewhat interesting, but I'm not using QtCreator, and I'm not sure exactly what I would do even if I were. We're all-linux with a cmake build system, command line and each person's favorite text editor. I use kdbg as a front end for gdb. – DarenW Jan 06 '11 at 22:42
  • 1
    Did anyone actually try this and get it to work? It doesn't work for me with Creator 3.2.82. I don't see an image anywhere. – Mitch Nov 26 '14 at 17:09