Browser application, how to serialize
HI! I am running a example browser application on an ARM cpu on QtWebKit. I have implemented keyPressEvent() in WebView(derived from QWebView) class like this 239 void WebView::keyPressEvent(QKeyEvent *key) 240 { 241 switch(key->key()) 242 { 243 case Qt::Key_F10: 244 QWebFrame *frame = page()->mainFrame(); 245 const qreal scaleFactor = 1.2000; 246 qDebug() << "Zoom Begin"; 247 myLabel->show(); 248 frame->setZoomFactor(scaleFactor); 249 qDebug() << "Zoom end"; 250 break; 251 } 252 } myLabel is a Label widget constructed in constructor of WebView class. The problem is after the setZoomFactor() has finished zooming the frame, we get to see the label widget. The qDebug() statements however get displayed on console in s sequence they are written in code. I want to display the label before starting to zoom and hide the label after the frame has been zoomed. Can you please help me in knowing how can I serialize these functionalities? regards -Nitin New Email addresses available on Yahoo! Get the Email name you've always wanted on the new @ymail and @rocketmail. Hurry before someone else does! http://mail.promotions.yahoo.com/newdomains/aa/
The problem is after the setZoomFactor() has finished zooming the frame, we get to see the label widget. The qDebug() statements however get displayed on console in s sequence they are written in code.
I want to display the label before starting to zoom and hide the label after the frame has been zoomed. Can you please help me in knowing how can I serialize these functionalities?
Widgets handling in Qt is asynchronous, it will not get the show event until the event loop/dispatcher has the chance to deliver that event (which it did not while zooming is still being carried out). You might want to have a look at http://doc.trolltech.com/4.5/qcoreapplication.html#processEvents for details. A friendly warning: this is more a Qt question, less related to WebKit. Please ask such questions on qt-interest list, or post it to StackOverflow, or contact Qt support if you are a paid customer, or just call your nearest Qt consultant. -- Ariya Hidayat, Software Engineer Qt Software, Nokia Devices R&D
--- On Tue, 30/6/09, Ariya Hidayat <ariya.hidayat@trolltech.com> wrote:
From: Ariya Hidayat <ariya.hidayat@trolltech.com> Subject: Re: [webkit-dev] Browser application, how to serialize To: webkit-dev@lists.webkit.org Date: Tuesday, 30 June, 2009, 3:20 PM
The problem is after the setZoomFactor() has finished zooming the frame, we get to see the label widget. The qDebug() statements however get displayed on console in s sequence they are written in code.
I want to display the label before starting to zoom and hide the label after the frame has been zoomed. Can you please help me in knowing how can I serialize these functionalities?
Widgets handling in Qt is asynchronous, it will not get the show event until the event loop/dispatcher has the chance to deliver that event (which it did not while zooming is still being carried out). You might want to have a look at http://doc.trolltech.com/4.5/qcoreapplication.html#processEvents for details.
Thanks for your inputs.
A friendly warning: this is more a Qt question, less related to WebKit. Please ask such questions on qt-interest list, or post it to StackOverflow, or contact Qt support if you are a paid customer, or just call your nearest Qt consultant.
I will take care of this. regards -Nitin Get your preferred Email name! Now you can @ymail.com and @rocketmail.com. http://mail.promotions.yahoo.com/newdomains/aa/
participants (2)
-
Ariya Hidayat
-
Nitin Mahajan