I have a project set up in Qt Designer 3.2 that has both a main application and a dialog box. I have several buttons in the dialog box. I am wanting to set it up where each button I click will cause a different string to be printed in a text edit in the main application. I can't seem to figure out how to make this happen.

Is there some way that I can declare a global QString variable that I can initialize in the dialog box before displaying in the main application? Or, if not, is there some way to set it up so that one of several possible values can be sent to the main application, serving as a signal telling the main application to print a specific string?

Any help (including code) that you could give me would be great. Thanks!