When you write a
score for a specific tonality, Major C for example, you can
transpose it to another tonality in one operation.
Select the key
signatures tool. Modify the key signature in D for example (2
sharps) and check the "Transpose the notes" box, which
is disabled by default. When you click OK, the score is
transposed into the new tonality.
If you select
measures and choose the "Transpose..." item in the
"Edit" menu, the key signature is not affected.
Accidentals modified by the transposition are added to the notes.
If you want them to appear in the key signature, you must also
modify the key signature with the key signatures tool (but this
time without checking "Transpose the notes").