taylor34
10th February 2006, 17:28
Hello--
First time posting here, so go easy on me. I'm trying to hook up some legacy C code to Qt and I'm having some problems. Basically, there's a callback function in C that I register for, and that passes me back a char*. I would like to put that information into a textedit box for the user to look at.
I've been trying to hack it in by calling one of the qt member functions by function pointers but the only problem is that I don't have the correct object to use. (i.e. I can call like a QT member function slot that I made like "Write_To_Display", but it doesn't do anything because I can only pass in a dummy object--the this pointer has no value inside a non member function).
Is there any easy way to connect C callbacks with a Qt object? Thanks. Btw, I should mention that I'm using Designer and am editting inside the ui.h files.
Taylor34
First time posting here, so go easy on me. I'm trying to hook up some legacy C code to Qt and I'm having some problems. Basically, there's a callback function in C that I register for, and that passes me back a char*. I would like to put that information into a textedit box for the user to look at.
I've been trying to hack it in by calling one of the qt member functions by function pointers but the only problem is that I don't have the correct object to use. (i.e. I can call like a QT member function slot that I made like "Write_To_Display", but it doesn't do anything because I can only pass in a dummy object--the this pointer has no value inside a non member function).
Is there any easy way to connect C callbacks with a Qt object? Thanks. Btw, I should mention that I'm using Designer and am editting inside the ui.h files.
Taylor34