Results 1 to 5 of 5

Thread: Qt mimic jQuery shake effect

  1. #1
    Join Date
    May 2014
    Posts
    136
    Thanks
    72
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Windows

    Default Qt mimic jQuery shake effect

    Here is how a jQuery shake effect looks like: jQuery site (just scroll down and click the box as it asks in the demo). I want to do a similar thing with a QWidget in my Qt app.

    How do I do this? I am sorry that I am unable to post any code to show what I have tried till now, but I couldn't try anything at all, there doesn't seem to be any convenient animation API which will allow me to do such a thing. Of course I can make do with a timer, but that will be very clumsy.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,176
    Thanks
    36
    Thanked 1,487 Times in 1,440 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt mimic jQuery shake effect

    You are probably looking at the "wrong" (not ideal) UI technology. QtQuick is the one that makes animations very easy, almost trivial.

    Cheers,
    -

  3. #3
    Join Date
    May 2014
    Posts
    136
    Thanks
    72
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Windows

    Default Re: Qt mimic jQuery shake effect

    The project is not using QtQuick, so cannot resort to that. Any other way of doing it?

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,176
    Thanks
    36
    Thanked 1,487 Times in 1,440 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt mimic jQuery shake effect

    You can try using a QPropertyAnimation on the widget's geometry property.

    Cheers,
    _

  5. #5
    Join Date
    May 2014
    Posts
    136
    Thanks
    72
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Windows

    Default Re: Qt mimic jQuery shake effect

    Yeah, found the API. Will try it and post further if I am stuck.

Similar Threads

  1. Replies: 1
    Last Post: 3rd September 2013, 20:51
  2. QtWebkit and TinyScrollbar jQuery plugin.
    By namnoi38 in forum Qt Webkit
    Replies: 0
    Last Post: 18th September 2012, 17:06
  3. Replies: 1
    Last Post: 11th May 2012, 19:08
  4. jQuery problem on QWebView
    By chenff in forum Qt Programming
    Replies: 0
    Last Post: 10th April 2010, 20:43
  5. 3D Effect
    By andzoff in forum Qt Programming
    Replies: 2
    Last Post: 15th March 2010, 12:52

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.