Make your QMainWindow a singleton or a global object. Then you'll be able to use its methods in the message handler.
Make your QMainWindow a singleton or a global object. Then you'll be able to use its methods in the message handler.
Thanks, I will try that.
Hmm, it only seems to work if I declare my log function as static.
But then I cannot use ui.xxxxxx because it is not I cannot decalare ui as static.
OK, It seems I got a solution. I save the point to the TextEdit in a global pointer.
Qt Code:
QPlainTextEdit * MyplainTextEdit=NULL; int main(int argc, char *argv[]) { Server main_window(); MyplainTextEdit=main_window.ui.PlainTextEdit .....To copy to clipboard, switch view to plain text mode
Last edited by jpn; 13th September 2008 at 15:57. Reason: missing [code] tags
Bookmarks