Results 1 to 3 of 3

Thread: emiting signals from const member functions !?

  1. #1
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default emiting signals from const member functions !?

    Is there a way to emit signals form const member functions;
    I am getting errors :
    In member function `float PayrollCreator::hraPercent() const':
    BusinessLogic/PayrollCreator.cpp:516: error: passing `const PayrollCreator' as `this' argument of `void PayrollCreator::log(const QString&)' discards qualifiers
    We can't solve problems by using the same kind of thinking we used when we created them

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

    Default Re: emiting signals from const member functions !?

    Make the slot const too.

  3. #3
    Join Date
    Jan 2006
    Location
    New Malden (near London)
    Posts
    32
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: emiting signals from const member functions !?

    Quote Originally Posted by sunil.thaha
    Is there a way to emit signals form const member functions;
    I am getting errors :
    There is a section on emitting signals from a const method in Practical Qt. It's on page 236.

Similar Threads

  1. shared vs static
    By alisami in forum Installation and Deployment
    Replies: 3
    Last Post: 4th October 2008, 13:04
  2. Qtopia core 4.2.2 cross compile make error
    By smiyai18 in forum Installation and Deployment
    Replies: 2
    Last Post: 28th August 2007, 17:04
  3. qt 4.2.2 install in tru64 cxx
    By try to remember in forum Installation and Deployment
    Replies: 0
    Last Post: 30th March 2007, 07:43
  4. QTableView paints too much
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2006, 18:42
  5. Delegates and Table
    By ankurjain in forum Qt Programming
    Replies: 8
    Last Post: 18th May 2006, 19:47

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.