Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Avantages of subclassing Events over defining new Signals and slots
Forum Updated to NodeBB v4.3 + New Features

Avantages of subclassing Events over defining new Signals and slots

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 998 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aureshinite
    wrote on last edited by
    #1

    Is there any advantage of using custom events over using custom signals and slots. I usually go for the signal and slots, because I took this habit from the beginning of my Qt experience. Is there any advantage in code style, performance ,architecture design (or anything else) of using custom events over signals and slots?? When does sub-classing events more appropriate than creating signals and slots?

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      QMartin
      wrote on last edited by
      #2

      Hello!

      I think there are no advantages or disadvantages. Each one has its own purpose.

      This is from Qt4 programming book:

      bq. Copyright (c) 2006 by Jasmin Blanchette and Mark Summerfield. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/).
      "...Qt widgets emit signals when something significant occurs. Events become useful when we write our own custom widgets or when we want to modify the behaviour of existing Qt widgets." Chapter 7, page 163.

      Hope this answers your question.

      Regards

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved