PDA

View Full Version : Qt and Callbacks



^NyAw^
15th November 2006, 15:28
Hi,
I'm trying to use a PCI DAQ (PCI card for Input/Output) in a Qt Project.

If I include the Header of the Card SDK into any class I have copiling errors. This is because it could be able to create multiple objects from this class and the Callbacks only permit to be defined once (every object will have its own memory adress).

If I include the Header of the Card SDK into the MainWindow class the compiler doesn't produce any errors and I'm able to use the card functions to acces it.

Why I'm able to use it in the MainWindow class and not able in another class ?
Is there any way to solve this ?

Thanks,

jpn
15th November 2006, 15:58
Mind showing the errors? Have you tried including the card sdk headers after/before Qt headers?

^NyAw^
15th November 2006, 16:08
Hey !
It's working now.

I tryied to includ the header before the Qt includes as you said.

I don't looked that in one file I was putting it in after them and in the other file I was putting them before them. Now, putting it before all the other includes it works.

Thanks a lot,;)