It depends what you want to do... I guess you should have some method that performs adjustments to the dialog after you change the variable and before exec is called. Actually you should change that variable through the same method instead of operating on it directly.
Qt Code:
MyDialog dlg; dlg.setSomething("xyz"); // this sets the string and adjusts the dialog dlg.exec();To copy to clipboard, switch view to plain text mode
Bookmarks