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. Singleton in QT. How?
Forum Updated to NodeBB v4.3 + New Features

Singleton in QT. How?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 397 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.
  • B Offline
    B Offline
    bogong
    wrote on last edited by
    #1

    Hello all!
    I am perfectly aware of Singleton on C++. The question - Is in Qt something special in conjunction to Q_OBJECT macros? Is there example of Qt (not pure C++)?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Singletons in Qt are exactly the same as C++ singletons. No special magic of any kind.

      Well, for convenience you can use Q_DISABLE_COPY for less typing, but it's really just a tiny convenience wrapper.

      (Z(:^

      B 1 Reply Last reply
      4
      • sierdzioS sierdzio

        Singletons in Qt are exactly the same as C++ singletons. No special magic of any kind.

        Well, for convenience you can use Q_DISABLE_COPY for less typing, but it's really just a tiny convenience wrapper.

        B Offline
        B Offline
        bogong
        wrote on last edited by
        #3

        @sierdzio Thx to you. Issue solved, example published.

        1 Reply Last reply
        1

        • Login

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