Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Application Development with Qt Creator - Second Edition
  • Toc
  • feedback
Application Development with Qt Creator - Second Edition

Application Development with Qt Creator - Second Edition

4 (25)
close
Application Development with Qt Creator - Second Edition

Application Development with Qt Creator - Second Edition

4 (25)

Overview of this book

This book is great for developers who are new to Qt and Qt Creator and who are interested in harnessing the power of Qt for cross-platform development. If you have basic experience programming in C++, you have what it takes to create engaging cross-platform applications using Qt and Qt Creator!
Table of Contents (15 chapters)
close
14
Index

Debugging Qt's signal-slot connections


What do you do if you think that you've correctly connected a signal to a slot and yet your slot's not being fired?

Here's a bunch of things you can try:

  • Check the compile log for error messages about undefined signals and slots.

  • Check the runtime log for errors on connection. If need be, ensure that the connection succeeds by testing its return value (it should return true).

  • Check to make sure that the connect code, the emit code, and the slot code is reached. (Odds are one of them isn't.)

  • Make sure that you declare the connection as follows:

    connect(sender, SIGNAL(someSignal(type)), receiver,     
            SLOT(received(type)))
  • The signal and slot specifications should have the argument types, but not the arguments themselves. Moreover, you can omit const and the reference specifications in the arguments; the metaobject compiler strips them anyway.

  • Check the parameters of the signal and slot and ensure that they match precisely.

  • Check to be sure that you've...

bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete