[Qt-interest] Some guidance asked
Jeroen De Wachter
jeroen.dewachter at barco.com
Mon Nov 23 10:32:10 CET 2009
Hello Kari,
You can call C routines from Qt just like you call C routines from any
other C++ program, by using the extern "C" construct
More info:
http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html
Note that most libraries will take care of this on their own (within
their headers, using "#ifdef __cplusplus" conditionals), which enables
you to just include the header files and use the functions without
bothering with the C/C++ interaction.
If you are using home grown C header files you'll need to take it into
account though...
Kind regards,
Jeroen
On Mon, 2009-11-23 at 10:10 +0200, Kari Laine wrote:
> Hi,
>
> I am writing a Linux-version of oscilloscope program for Velleman PCSGU250.
> Now I have the userinterface mostly done. I still have to do some of
> the dynamics of the interface.
>
> I have done the communication to scope with C using libusb and it works.
>
> The useinterface is running on the main thread. I am considering using
> own thread to read the scope data.
> and maybe use own thread to send data to scope and function generator.
> Is this the right way?
> Is it possible to have shared buffer in between the userinterface
> thread and worker threads?
>
> How can I call C-routines from QT?
>
> How I draw the data oscilloscope sent, to the QWidget, which is the
> output window of the scope.
>
> As you notice these are quite stupid questions - I am just after how
> to put it all together.
> Any comments highly appreciated. And I am not much a programmer ...
>
>
> Best Regards
> Kari
>
>
> --
> PIC - AVR - DISPLAYS - RELAYS - MODULES - CONVERTERS - I2C - SPI -
> KEYBOARDS - ACCESSORIES
> http://www.byvac.com (I am just a satisfied customer)
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
DISCLAIMER:
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.
More information about the Qt-interest-old
mailing list