diff options
author | David Boddie <david.boddie@nokia.com> | 2011-04-27 17:16:41 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-05-04 16:34:57 (GMT) |
commit | b727e5b95c1f0bd308b228fcf0445b42847ae583 (patch) | |
tree | e120ca1ec5c2e303fb6fca97bc9754403e0f25f2 /src/gui | |
parent | 6d1e0faa19be784f79730d65af9c1a162245c7dc (diff) | |
download | Qt-b727e5b95c1f0bd308b228fcf0445b42847ae583.zip Qt-b727e5b95c1f0bd308b228fcf0445b42847ae583.tar.gz Qt-b727e5b95c1f0bd308b228fcf0445b42847ae583.tar.bz2 |
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
(cherry picked from commit 539311f7b2687e3148ea695ce06fee768abe7b44)
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/itemviews/qdatawidgetmapper.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qcocoasharedwindowmethods_mac_p.h | 13 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 2 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/gui/itemviews/qdatawidgetmapper.cpp b/src/gui/itemviews/qdatawidgetmapper.cpp index 745ef5a..dac4613 100644 --- a/src/gui/itemviews/qdatawidgetmapper.cpp +++ b/src/gui/itemviews/qdatawidgetmapper.cpp @@ -291,7 +291,7 @@ void QDataWidgetMapperPrivate::_q_modelDestroyed() \snippet doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp 0 After the call to toFirst(), \c mySpinBox displays the value \c{1}, \c myLineEdit - displays \c {Nokia Corporation and/or its subsidiary(-ies)} and \c myCountryChooser displays \c{Oslo}. The + displays \c{Qt Norway} and \c myCountryChooser displays \c{Oslo}. The navigational functions toFirst(), toNext(), toPrevious(), toLast() and setCurrentIndex() can be used to navigate in the model and update the widgets with contents from the model. diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index ee1115b..c44c8f1 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -199,6 +199,19 @@ QT_END_NAMESPACE [super setInitialFirstResponder:view]; } +- (void)setInitialFirstResponder:(NSView *)view +{ + // This method is called the first time the window is placed on screen and + // is the earliest point in time we can connect OpenGL contexts to NSViews. + QWidget *qwidget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self]; + if (qwidget) { + qt_event_request_window_change(qwidget); + qt_mac_send_posted_gl_updates(qwidget); + } + + [super setInitialFirstResponder:view]; +} + - (BOOL)makeFirstResponder:(NSResponder *)responder { // For some reason Cocoa wants to flip the first responder diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index ebc9dd5..80d7b85 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -612,7 +612,7 @@ void QWidget::setAutoFillBackground(bool enabled) \brief The QWidget class is the base class of all user interface objects. \ingroup basicwidgets - + The widget is the atom of the user interface: it receives mouse, keyboard and other events from the window system, and paints a representation of itself on the screen. Every widget is rectangular, and they are sorted in a |