Last active
March 30, 2021 14:02
-
-
Save raghunayak/be092775afebcba1e8830a2d1d215793 to your computer and use it in GitHub Desktop.
Sample to show how space can be disabled/enabled in middle of qDebug logging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QDebug> | |
// Output: Log with spaces Logwithoutspaces Again Logging with spaces | |
int main(int argc, char *argv[]) | |
{ | |
auto log = qDebug(); | |
log << "Log" << "with" << "spaces"; | |
log.nospace(); | |
log << "Log" << "without" << "spaces"; | |
log.space(); | |
log << "Again Logging" << "with" << "spaces"; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment