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. System Sounds
Qt 6.11 is out! See what's new in the release blog

System Sounds

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 1.0k Views 3 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by
    #1

    I can get a beep out of my application using QApplication::beep().

    On Windows at least the system has a gamut of different event types and associated sounds. I'd like to be able to do something like:

    QApplication::systemSound(Qt::EventType::CriticalStop)
    

    I realise that using names specific to Windows won't fly, but I was wondering if Qt has something that's a cross platform Qt analogue that I failed to find in the docs.

    Thanks, David

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      AFAIK, no, you did not miss anything.

      The function comes from a time where there weren't that many fancy sounds :-)

      Depending on what you would like to do, QSoundEffect could be a replacement but you will have to provide your own sounds.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      PerdrixP 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        AFAIK, no, you did not miss anything.

        The function comes from a time where there weren't that many fancy sounds :-)

        Depending on what you would like to do, QSoundEffect could be a replacement but you will have to provide your own sounds.

        PerdrixP Offline
        PerdrixP Offline
        Perdrix
        wrote on last edited by
        #3

        @SGaist Oh well, "So ist das leben!". Thanks, D.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SimonSchroeder
          wrote on last edited by
          #4

          I assume QApplication::beep() is just sending \a to the console. This would also the reason why this cannot be expanded to other system sounds.

          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