I would make sure that a piece of source code is compiled only when Qt Creator is set up to compile the current project in debug mode. Otherwise, if Qt Creator is set up to compile the source code of a project in release mode, this piece of source code should not be compiled.
#ifdef QT_DEBUG
// do something (debug mode)
#endif
Should work
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.