Results 1 to 3 of 3

Thread: Qt and Callbacks

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Qt and Callbacks

    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,

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qt and Callbacks

    Mind showing the errors? Have you tried including the card sdk headers after/before Qt headers?
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Talking Re: Qt and Callbacks

    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,
    Òscar Llarch i Galán

Similar Threads

  1. C callbacks and QT
    By taylor34 in forum Qt Programming
    Replies: 2
    Last Post: 10th February 2006, 19:58

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.