Results 1 to 4 of 4

Thread: Handling callbacks in Qt5

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Handling callbacks in Qt5

    Good day experts,

    We have an IPC protocol stack that was developed a while ago, which I inherited. I am currently trying to use this stack in my Qt5 application to communicate with some of our other devices which use this IPC protocol stack. This stack is based on callbacks and due to its complex nature and my limited understanding thereof, I cannot easily convert it to Qt's signals and slots.

    I have attached the header file that we use to make the callbacks and below is a typical example of how it is used:

    Qt Code:
    1. _ripc_protocol_handler->register_platform_specific_send_function(
    2. (Rap_send_callback) make_callback(
    3. (Rap_send_callback*) 0, this,
    4. &Tc4_lp_programmer::_write_to_port
    5. )
    6. );
    To copy to clipboard, switch view to plain text mode 

    with Rap_send_callback defined as follows:

    Qt Code:
    1. typedef cntb_cb::Callback<Rap_callback_object*> Rap_send_callback;
    To copy to clipboard, switch view to plain text mode 

    This code works fine with Visual Studio 2005 C++ compiler. In Qt5 with the MingW compiler for Windows, I do not get any compiler warnings or errors, but at runtime the program would crash when registering the callback as illustrated above.

    I am aware that I am providing limited information here, I'll do my best to gather some more, but can someone please just provide me with some pointers or just point me in the right direction?

    Thanks in advance!
    Attached Files Attached Files

Similar Threads

  1. combining external lib callbacks with QT signals
    By plori in forum Qt Programming
    Replies: 1
    Last Post: 30th January 2012, 01:07
  2. QScript script side callbacks
    By starlon in forum Qt Programming
    Replies: 0
    Last Post: 10th November 2009, 23:29
  3. Qt Plugins and Callbacks
    By abernat in forum Qt Programming
    Replies: 8
    Last Post: 24th February 2009, 23:51
  4. Qt and Callbacks
    By ^NyAw^ in forum Qt Programming
    Replies: 2
    Last Post: 15th November 2006, 16:08
  5. 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.