Results 1 to 5 of 5

Thread: how to animate a subclassed widget

  1. #1
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Default how to animate a subclassed widget

    hi
    how to animate a subclassed widget.

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to animate a subclassed widget

    Your question is as ambiguous as it can be.
    Post some code or explain what you did and what you are trying to do.

  3. #3
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Default Re: how to animate a subclassed widget

    Qt Code:
    1. class C_Widget : public QWidget
    2. {
    3. public:
    4. C_Widget() :
    5. {
    6. }
    7. };
    8.  
    9. int main(int argc, char **argv)
    10. {
    11. QApplication app(argc, argv);
    12. C_Widget w;
    13. w.show();
    14. return app.exec();
    15. }
    To copy to clipboard, switch view to plain text mode 


    how to animate the Object of the class C_Widget inside the QGraphicsView.

    i have subclassed QWidget which consists of QStackedWidget ,QTreeWidget,e.t.c.

    how to animate the subclassed QWidget in another window( like QGraphicsItem's are animated in the QGraphicsView).

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to animate a subclassed widget

    With Qt 4.3.x you can use the standard widget geometry functions: QWidget::move(), QWidget::resize().
    Keep in mind that the parent widget must not have a layout manager in order for you to manually mode the widget.
    Also, you will only be able to translate and resize the widget. No skew or rotation.

    In 4.4.x you will be able to add widgets in a QGraphicsScene and apply all transformations you usually apply to QGraphicsItems.
    See http://labs.trolltech.com/blogs/2007/12/19/q/ and http://trolltech.com/products/qt/whatsnew/qt44-preview

  5. The following user says thank you to marcel for this useful post:

    babu198649 (31st December 2007)

  6. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: how to animate a subclassed widget

    See also [WIKI]Fade and scroll effects[/WIKI].
    J-P Nurmi

Similar Threads

  1. Replies: 3
    Last Post: 17th October 2007, 12:52
  2. transparent background of the main widget
    By nagpalma in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2007, 17:52
  3. Controlling which widget on top layer?
    By JonathanForQT4 in forum Qt Programming
    Replies: 6
    Last Post: 22nd March 2007, 14:27
  4. Pin/Unpin Dock Widget
    By charlesD in forum Newbie
    Replies: 1
    Last Post: 21st June 2006, 06:57
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

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.