×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    4

    Question Problem with window animation on emulator

    Hi,

    I am using S60 5th edition and Qt 4.6.0 for my project. I am trying to animate a window launch like the way it appears on iPhone. The animation seems to work fine on desktop but it is not smooth on device(N97) and emulator. It leaves trails of previous frames that are painted.

    Here is the code

    //MyWidget inherits from QWidget, it contains a QWebView, QLabel and QPushButton arranged in
    // QVBoxLayout
    MYWidget::MYWidget(QWidget *parent)
    {
    //code to layout text edit and buttons

    QPropertyAnimation *animation = new QPropertyAnimation( this, "geometry");
    animation->setDuration(600);
    animation->setKeyValueAt(0, QRect ( 320 ,180 , 20 ,20));
    animation->setKeyValueAt(1, QRect( 10, 10, 620, 340));
    animation->start();
    connect(animation, SIGNAL(valueChanged(QVariant)), this, SLOT(update));
    }

    void MYWidget:aintEvent(QPaintEvent *pnt)
    {
    //code to draw the border using QPainter
    QPainter painter(this);
    QColor current_color = Qt::black;
    QPen pen;
    pen.setWidth(borderPenWidth);
    current_color.setAlpha(100);
    pen.setColor(current_color);
    painter.setPen(pen);
    painter.drawRoundedRect(QRectF(10, 10, 620 , 340, 5.0, 5.0);
    }

    i have also tried using QTimeLine to animate it. But it also has the same problem. The grow effect is not smooth and it leaves trails of previous frames.

    How can i get it smooth like it is on iPhone. I have seen a video on Qt Developer Days which had the same effect i wanted but i don't know how they did it.

    Any pointers on how to achieve the application\window launch effect similar to iPhone will be of great help.

    Thanks,
    Anuj

  2. #2
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: Problem with window animation on emulator

    Quote Originally Posted by anujgupta131 View Post
    Hi,

    I am using S60 5th edition and Qt 4.6.0 for my project. I am trying to animate a window launch like the way it appears on iPhone. The animation seems to work fine on desktop but it is not smooth on device(N97) and emulator. It leaves trails of previous frames that are painted.

    Here is the code

    //MyWidget inherits from QWidget, it contains a QWebView, QLabel and QPushButton arranged in
    // QVBoxLayout
    MYWidget::MYWidget(QWidget *parent)
    {
    //code to layout text edit and buttons

    QPropertyAnimation *animation = new QPropertyAnimation( this, "geometry");
    animation->setDuration(600);
    animation->setKeyValueAt(0, QRect ( 320 ,180 , 20 ,20));
    animation->setKeyValueAt(1, QRect( 10, 10, 620, 340));
    animation->start();
    connect(animation, SIGNAL(valueChanged(QVariant)), this, SLOT(update));
    }

    void MYWidget:aintEvent(QPaintEvent *pnt)
    {
    //code to draw the border using QPainter
    QPainter painter(this);
    QColor current_color = Qt::black;
    QPen pen;
    pen.setWidth(borderPenWidth);
    current_color.setAlpha(100);
    pen.setColor(current_color);
    painter.setPen(pen);
    painter.drawRoundedRect(QRectF(10, 10, 620 , 340, 5.0, 5.0);
    }

    i have also tried using QTimeLine to animate it. But it also has the same problem. The grow effect is not smooth and it leaves trails of previous frames.

    How can i get it smooth like it is on iPhone. I have seen a video on Qt Developer Days which had the same effect i wanted but i don't know how they did it.

    Any pointers on how to achieve the application\window launch effect similar to iPhone will be of great help.

    Thanks,
    Anuj

    It is ordinary that it is going to make back image..

    This is due to the slow grow effect .

    Try to make faster the grow effect , it will definitely reduce the flickering or back image production...

    Best regards,

  3. #3
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Problem with window animation on emulator

    Quote Originally Posted by anujgupta131 View Post
    How can i get it smooth like it is on iPhone. I have seen a video on Qt Developer Days which had the same effect i wanted but i don't know how they did it.
    That demo was probably implemented with OpenGL ES.

Similar Threads

  1. Modules required :)
    By neil.young in forum Symbian
    Replies: 20
    Last Post: 2009-06-07, 11:35
  2. Eclipse + S60 SDK 5th v1.0 + J2ME eclipse plugin: Emulator problem
    By ares.f in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2009-05-29, 10:04
  3. SDK 5.0 Emulator problem
    By skyjun in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2009-04-17, 09:16
  4. Emulator Problem
    By jackxie in forum Symbian Tools & SDKs
    Replies: 8
    Last Post: 2007-09-27, 12:06
  5. some problem when using network on emulator
    By xhsoldier in forum Symbian Networking & Messaging (Closed)
    Replies: 9
    Last Post: 2006-12-06, 06:16

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×