Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Spanish
  4. Reproducir sonido en Qt5 + windows 8 + minGW
Forum Updated to NodeBB v4.3 + New Features

Reproducir sonido en Qt5 + windows 8 + minGW

Scheduled Pinned Locked Moved Spanish
3 Posts 2 Posters 2.9k 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
    arkero24
    wrote on last edited by
    #1

    Buenas noches señores:

    Podrían decirme cómo puedo reproducir un sonido en qt cada vez que presiono un botón, o cuando según un evento se produzca, lo hago par un juego simple; soy novato (apenas llevo una semana) en Qt. Y he realizado este juego y deseo agregarle sonido, pero me da error: Les dejo mi linea de codigo donde aparece el error y el tipo de error que me aparece:

    linea de Codigo_
    void winGame::gameStateSound(QString track){
    QSound player(track);
    player.play();
    }

    el error:

    E:\QtFilesPros\wtnBoy\wingame.cpp:284: error: undefined reference to `_imp___ZN6QSoundC1ERK7QStringP7QObject'

    He importado la libreria requerida (#include <QtMultimedia/QSound>), pero igual me da ese error. Saben a qué se refiere?
    Agradezco inmensamente su ayuda

    1 Reply Last reply
    0
    • T Offline
      T Offline
      topocc
      wrote on last edited by
      #2

      http://qt-project.org/doc/qt-5.0/qtmultimedia/audiooverview.html

      1 Reply Last reply
      0
      • T Offline
        T Offline
        topocc
        wrote on last edited by
        #3

        otra cosa solo se soporta formato wav.

        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