Results 1 to 3 of 3

Thread: About Q_PRIVATE_SLOT

  1. #1
    Join Date
    Aug 2014
    Posts
    4
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X Windows Android

    Question About Q_PRIVATE_SLOT

    Hello ,everyone:
    I've been tried to create a class contained a private class .q.jpg Forgive my poor English. When I used the Marcos Q_PRIVATE_SLOT, it goes wrong with saying that "invalid use of incomplete type ". How to solve this problem? Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: About Q_PRIVATE_SLOT

    Place a "#include crasy.moc" line at the end of your cpp file.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    Connailo (20th October 2014)

  4. #3
    Join Date
    Aug 2014
    Posts
    4
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X Windows Android

    Default Re: About Q_PRIVATE_SLOT

    Thanks for your replay.I've added the "#include "moc_crasy.cpp"" line at the end of the cpp file. But that does not work .

    Quote Originally Posted by wysota View Post
    Place a "#include crasy.moc" line at the end of your cpp file.
    Thanks for your replay.I've added the "#include "moc_crasy.cpp"" line at the end of the cpp file. But that does not work .


    Added after 17 minutes:


    Quote Originally Posted by wysota View Post
    Place a "#include crasy.moc" line at the end of your cpp file.
    I rebuild it,work well.thanks!
    Last edited by Connailo; 20th October 2014 at 09:41.

Similar Threads

  1. QObject::sender() in a Q_PRIVATE_SLOT
    By vfernandez in forum Qt Programming
    Replies: 13
    Last Post: 17th June 2010, 19:57

Tags for this Thread

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.