Results 1 to 1 of 1

Thread: Qt Quick, QML Carousel animation

  1. #1
    Join Date
    Apr 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Qt Quick, QML Carousel animation

    Hello all,

    Recently I have tried adding [QGraphicsItem/QWidget]s to a Qt Quick carousel/cover flow animation ( QML's PathView ). What I have done to add custom widget/graphics item to the path view's list of items was to use the QWidget (which was converted to QGraphicsItem through QGraphicsProxyWidget) or QGraphicsItem in a wrapper class of QDeclarativeItem:

    1) Create a class that inherits QDeclarativeItem.
    2) Create your QGraphicsItemb-based object or QWidget-based one, where the latter is subsequently added to a QGraphicsProxyWidget.
    3) Set the successor of the QDeclarativeItem to be parent of the custom item.
    4) Override the:
    Qt Code:
    1. virtual QVariant QGraphicsItem::itemChange ( GraphicsItemChange change, const QVariant & value );
    To copy to clipboard, switch view to plain text mode 
    in the successor of QDeclarativeItem.
    5) In the overridden method above, make so that when the scene of the QDeclarativeItem is changed, change the scene of your custom item!
    This should not be needed since the custom item is parented to the QDeclarativeItem's successor, but tests proven it was needed. Somehow the QDeclarativeItem's successor doesn't automatically add/remove child items to/from the scene.
    Last edited by napajejenunedk0; 25th August 2011 at 12:04.

Similar Threads

  1. Qt Quick QML
    By Brandon_R in forum Qt Quick
    Replies: 1
    Last Post: 17th August 2011, 18:21
  2. qt quick plugin.
    By wookoon in forum Qt Quick
    Replies: 1
    Last Post: 22nd April 2011, 09:18
  3. Quick application (Qa)
    By tilsitt in forum Qt-based Software
    Replies: 1
    Last Post: 7th April 2011, 13:45
  4. Qt Quick QML animation stressing CPU
    By petermcg in forum Qt Quick
    Replies: 2
    Last Post: 3rd April 2011, 11:30
  5. Page flip animation using Qt Quick
    By bezstellar in forum Qt Quick
    Replies: 0
    Last Post: 1st December 2010, 08:37

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.