Results 1 to 9 of 9

Thread: cant make QSound work

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Posts
    19
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default cant make QSound work

    i cant make a sound using QSound.
    ubuntu 8.04
    QT X11
    Wave file is 16 bit non-compressed .

    Qt Code:
    1. #include <QApplication>
    2. #include <QSound>
    3.  
    4.  
    5. int main(int argc, char *argv[])
    6. {
    7. QApplication a(argc, argv);
    8.  
    9. QSound:: play("../wavefile/laugh.wav");
    10.  
    11. /* QString alarmInfo;
    12.   if (argc > 1) {
    13.   alarmInfo = argv[1];
    14.   }
    15.   else {
    16.   alarmInfo = "..........................." ;
    17.   }
    18. */
    19.  
    20. return a.exec();
    21. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 18th March 2009 at 09:05. Reason: missing [code] tags

Similar Threads

  1. QThread doent work for QSound
    By anafor2004 in forum Qt Programming
    Replies: 2
    Last Post: 19th November 2008, 16:00
  2. how to make Window+M key work for my application
    By yxmaomao in forum Qt Programming
    Replies: 4
    Last Post: 10th July 2008, 00:35
  3. make QTableView work as a multi-column list view
    By wesley in forum Qt Programming
    Replies: 1
    Last Post: 11th March 2008, 14:43
  4. how to make QHttp work with this URL
    By ber_44 in forum Qt Programming
    Replies: 11
    Last Post: 23rd April 2007, 09:20
  5. Why can't I make dynamic_cast work properly?
    By pir in forum General Programming
    Replies: 13
    Last Post: 18th July 2006, 16:17

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.