[Qt-creator] Copy code with line numbers?

Murphy, Sean smurphy at walbro.com
Fri Apr 27 15:45:51 CEST 2018


> > Is there a way in Qt Creator to copy a block of code out of Creator including
> the line numbers? I *sometimes* find it handy to do that when emailing with
> a co-worker explaining how a certain segment of code works, where I can
> just refer back to line numbers in my explanation which is above or below
> the actual code.
> 
> Screenshot?

I thought about that, but it would be more useful to the recipient if they could copy/paste
snippets out of the code.

> Pastebin?

That might be closer, but the downside is the explanation of the code in my email
and the code itself aren't near each other.

This isn't a big issue, just a curiosity on my part. It arose by my manager asking if we
were sure a certain chunk of code does what we thought it does, so I was pulling
that chunk out of the project, but then providing a little context of what some of the
variables were, where this code is called, etc. since it was just a code snippet, and I
was thinking how much more helpful it would have been if there were line numbers
automatically included.

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com


More information about the Qt-creator mailing list