• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            天下

            記錄修行的印記

            鍵盤事件的傳遞

            class Q_GUI_EXPORT QWidget : public QObject, public QPaintDevice
            {
            protected:
                QWidget(QWidgetPrivate 
            &d, QWidget* parent, Qt::WindowFlags f);
            }

            /*
            \internal
            */
            QWidget::QWidget(QWidgetPrivate 
            &dd, QWidget* parent, Qt::WindowFlags f)
                : QObject(dd, 
            0), QPaintDevice()
            {
                Q_D(QWidget);
                QT_TRY {
                    d
            ->init(parent, f);
                } QT_CATCH() {
                    QWidgetExceptionCleaner::cleanup(
            this, d_func());
                    QT_RETHROW;
                }
            }



            //鍵盤事件的傳遞
            extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
            {
                    
            case WM_CHAR: {
                        MSG msg1;
                        
            bool anyMsg = PeekMessage(&msg1, msg.hwnd, 00, PM_NOREMOVE);
                        
            if (anyMsg && msg1.message == WM_DEADCHAR) {
                            result 
            = true// consume event since there is a dead char next
                            break;
                        }
                        QWidget 
            *= QWidget::keyboardGrabber();
                        
            if (g && qt_get_tablet_widget() && hwnd == qt_get_tablet_widget()->winId()) {
                            
            // if we get an event for the internal tablet widget,
                            
            // then don't send it to the keyboard grabber, but
                            
            // send it to the widget itself (we don't use it right
                            
            // now, just in case).
                            g = 0;
                        }
                        
            if (g)
                            widget 
            = (QETWidget*)g;
                        
            else if (QApplication::activePopupWidget())  
                            widget 
            = (QETWidget*)QApplication::activePopupWidget()->focusWidget()
                                   
            ? (QETWidget*)QApplication::activePopupWidget()->focusWidget()
                                   : (QETWidget
            *)QApplication::activePopupWidget();
                        
            else if (QApplication::focusWidget())  //這里條件為真
                            widget = (QETWidget*)QApplication::focusWidget();  //得到具有輸入焦點的widget
                        else if (!widget || widget->internalWinId() == GetFocus()) // We faked the message to go to exactly that widget.
                            widget = (QETWidget*)widget->window();
                        
            if (widget->isEnabled())
                            result 
            = sm_blockUserInput
                                        
            ? true
                                        : qt_keymapper_private()
            ->translateKeyEvent(widget, msg, g != 0);
                        
            break;
                    }
                
            //..
            }


            extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
            {
                
            if (qt_is_translatable_mouse_event(message)) {
                    
            if (QApplication::activePopupWidget() != 0) { // in popup mode
                        POINT curPos = msg.pt;
                        QWidget
            * w = QApplication::widgetAt(curPos.x, curPos.y);
                        
            if (w)
                            widget 
            = (QETWidget*)w;
                    }

                
            if (!qt_tabletChokeMouse) {
                    result 
            = widget->translateMouseEvent(msg); 
                }
                }
            }

            posted on 2013-07-04 12:02 天下 閱讀(499) 評論(0)  編輯 收藏 引用 所屬分類: QT

            <2012年1月>
            25262728293031
            1234567
            891011121314
            15161718192021
            22232425262728
            2930311234

            導航

            統計

            常用鏈接

            留言簿(4)

            隨筆分類(378)

            隨筆檔案(329)

            鏈接

            最新隨筆

            搜索

            最新評論

            欧美一区二区三区久久综| 99热精品久久只有精品| 久久WWW免费人成一看片| 久久天天婷婷五月俺也去| 色婷婷综合久久久久中文一区二区| 无码伊人66久久大杳蕉网站谷歌| 久久久久亚洲av无码专区导航| 国产呻吟久久久久久久92| 四虎国产精品成人免费久久| 亚洲AV无码久久精品狠狠爱浪潮 | 99久久精品国产一区二区| 久久精品国产福利国产琪琪| 国产aⅴ激情无码久久| 91精品国产色综久久| 久久久无码一区二区三区| 深夜久久AAAAA级毛片免费看 | 国产综合精品久久亚洲| 中文字幕日本人妻久久久免费| 久久综合综合久久97色| 久久久久久亚洲精品不卡| 国产亚洲色婷婷久久99精品| 亚洲乱码日产精品a级毛片久久| 日本精品久久久中文字幕| 久久午夜夜伦鲁鲁片免费无码影视| 国产精品青草久久久久福利99| 国产综合久久久久| 久久青青草原亚洲av无码app| 欧美日韩精品久久免费| 久久精品国产亚洲一区二区三区| 久久精品国产亚洲欧美| 五月丁香综合激情六月久久| 久久精品国产99久久久古代 | 亚洲精品美女久久久久99| 亚洲国产小视频精品久久久三级| 亚洲国产成人久久精品影视| 久久人妻少妇嫩草AV无码专区| 伊人久久综合精品无码AV专区| 久久天天躁狠狠躁夜夜2020一 | 人人狠狠综合久久亚洲88| 久久99热国产这有精品| 93精91精品国产综合久久香蕉 |