Results 1 to 3 of 3

Thread: Signal not receiving in QML file if call using class object.

  1. #1
    Join Date
    Aug 2012
    Posts
    23
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Signal not receiving in QML file if call using class object.

    I did a sample application for QML to C++ communication with signal and slot.
    I registered the class with “qmlRegisterType” and handled the signal in QML with “connection ”function. I got the signal from the corresponding CPP file in the QML slot. But if I call the signal emitting function from another class I do not receive it at the QML slot. The function call executed successfully, but the signal is not getting in the QML class.

    Could it be that, even though it got sent, it was not directed correctly?

    How can I correctly create an object for the class and communicate to the QML file?

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Signal not receiving in QML file if call using class object.

    Show us code.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Aug 2012
    Posts
    23
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Signal not receiving in QML file if call using class object.

    Thanks for your replay.
    I used Singleton class and corrected the issue.

Similar Threads

  1. Replies: 1
    Last Post: 3rd August 2012, 18:41
  2. How to connect to a unknown class object signal?
    By wshn13 in forum Qt Programming
    Replies: 6
    Last Post: 20th March 2012, 07:56
  3. How to call a function in the mother object from a child object?
    By Momergil in forum General Programming
    Replies: 4
    Last Post: 18th December 2011, 16:49
  4. Signal/slot or direct method call within a class
    By mike_the_tv in forum Newbie
    Replies: 6
    Last Post: 11th March 2010, 19:49
  5. Replies: 3
    Last Post: 16th May 2007, 12:07

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.