Results 1 to 19 of 19

Thread: Using QSound::play("...") not working

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using QSound::play("...") not working

    Quote Originally Posted by Charvi View Post
    My question was there are some events internally handled by Qt like the scrolling of the scroll bars of a QScrollArea. I do not get the key press sound over there and its obvious.
    I have no idea what you are talking about. All events are "handled internally by Qt". Qt doesn't handle any events "externally".
    Then you adviced to install event filter for those also.
    No, I haven't. I told you to install an event filter on the application object and not on any scroll area or anything like that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Mar 2012
    Location
    India
    Posts
    102
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Using QSound::play("...") not working

    By internally I meant by default. Like when we want to handle some events in our own way we install event filters. The events which we do not handle in them will be handled by Qt in a default way.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using QSound::play("...") not working

    Quote Originally Posted by Charvi View Post
    Like when we want to handle some events in our own way we install event filters.
    No, we reimplement event handlers. Event filters are for specific cases such as yours or for lazy people who don't care about quality of their code.

    The events which we do not handle in them will be handled by Qt in a default way.
    Next time please use the term "by default" and not "internally" if you want to say "by default". And now please install an event filter on the application object and have your problem solved.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Mar 2012
    Location
    India
    Posts
    102
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Using QSound::play("...") not working

    I accept. Will take care next time.

    BTW I don't get how event filters affect the quality of code?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using QSound::play("...") not working

    Quote Originally Posted by Charvi View Post
    BTW I don't get how event filters affect the quality of code?
    They can break encapsulation.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 1
    Last Post: 7th April 2010, 21:46
  2. Replies: 3
    Last Post: 15th February 2010, 17:27
  3. Replies: 3
    Last Post: 26th April 2009, 17:54
  4. Replies: 3
    Last Post: 8th July 2008, 19:37
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05

Tags for this Thread

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.