{"id":172869,"date":"2013-03-15T11:32:03","date_gmt":"2013-03-15T07:32:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=172869"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=172869","title":{"rendered":"<span class=\"post_title\">\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0441 \u00ab\u043c\u043e\u0440\u0433\u0430\u043d\u0438\u0435\u043c\u00bb \u044d\u043a\u0440\u0430\u043d\u0430 \u043f\u0440\u0438 \u0440\u0430\u0441\u0442\u044f\u0436\u043a\u0435 \u0432\u0438\u0434\u0435\u043e<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0417\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0441\u0435\u0439\u0447\u0430\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u0438\u0434\u0435\u043e \u043f\u043e\u0434 Windows. \u0418 \u00ab\u0437\u0430\u0432\u0438\u0441\u00bb \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0434 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u2014 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 Qt, \u0432\u0438\u0434\u0435\u043e \u0432 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043c\u043e\u0440\u0433\u0430\u0442\u044c \u0438 \u0438\u0441\u0447\u0435\u0437\u0430\u0442\u044c (\u0441\u043c. \u0432\u0438\u0434\u0435\u043e).<br \/>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"http:\/\/www.youtube.com\/embed\/o1pXihhQzGE?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe><br \/>  \u041f\u043e\u043f\u044b\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c QWidget::paintEvent \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e Qt \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0437\u0430\u043b\u0438\u0432\u043a\u0443 \u043d\u0430 (https:\/\/qt-project.org\/doc\/qt-4.8\/qwidget.html#autoFillBackground-prop) \u043f\u0435\u0440\u0435\u0434 QWidget::paintEvent. <br \/>  \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c WM_PAINT \u0438 WM_ERASEBACKGOUND \u0432 QWidget::winEvent \u0442\u043e\u0436\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u0430\u0441\u044c, \u0442.\u043a. paintEvent \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 WM_PAINT, \u043d\u043e \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 \u043f\u043e \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c\u0443 \u043c\u043d\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443. <br \/>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u0432\u044b\u0445\u043e\u0434\u0438\u043b \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0440\u0435\u0448\u0435\u043d\u0438\u0435:<br \/>  \u0420\u0435\u0448\u0438\u043b \u043d\u0435 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 Qt. \u0421\u0430\u043c \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 QWidget. \u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0432 \u043e\u043a\u043d\u0435 \u043f\u043b\u0435\u0435\u0440\u0430 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043a:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/a06\/006\/0ac\/a060060ac3dffedd1fe743edba5f3622.jpg\"\/><br \/>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043b\u044f \u043e\u043a\u043e\u043d. \u041e\u043d \u0432\u043e\u0437\u044c\u043c\u0435\u0442 \u043d\u0430 \u0441\u0435\u0431\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u0430 \u043e\u043a\u043d\u0430 \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c.<br \/>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c QApplication \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432. \u0423 \u043d\u0430\u0441 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f libqxt, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e QxtApplication:: installNativeEventFilter. \u0414\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2013 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c QCoreApplication::winEventFilter.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043a\u043b\u0430\u0441\u0441 WindowProcMapper \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c HWND \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c.<br \/>  nativewidgetimpl.h  <\/p>\n<pre><code class=\"cpp\">namespace Native {   \tclass NativeWndFilter : public QxtNativeEventFilter \t{ \tpublic: \t\tinline NativeWndFilter() { }   \t\tinline void insert(HWND h) { m_wnds.insert(h); } \t\tinline void remove(HWND h) { m_wnds.remove(h); } \t\tinline bool contains(HWND h) { return m_wnds.contains(h); }   \t\tbool winEventFilter(MSG * msg, long *result) override;   \tprivate: \t\tQSet&lt;HWND&gt; m_wnds; \t};   \ttemplate&lt;typename T&gt; \tclass WindowProcMapper \t{ \tpublic: \t\tWindowProcMapper(const wchar_t *className); \t\t~WindowProcMapper(); \t\tinline T *getWindow(HWND hwnd) const; \t\tinline void insertWindow(HWND hwnd, T *ptr); \t\tinline void removeWindow(HWND hwnd); \t\tATOM getRegisterResult();   \t\tbool registerWindowClass();   \t\tinline static WindowProcMapper&lt;T&gt; *instance() \t\t{ return self; } \t\t \tprivate: \t\tQHash&lt;HWND, T*&gt; m_hash; \t\tLPCWSTR m_className; \t\tATOM m_registerResult;   \t\tstatic WindowProcMapper *self;   \t\tstatic LRESULT CALLBACK WindowProc(_In_  HWND hwnd, _In_  UINT uMsg,  \t\t\t_In_  WPARAM wParam, _In_  LPARAM lParam);   \t\t \t\tNativeWndFilter *m_filter; \t}; } <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u0434\u043b\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0430:<br \/>  nativewidget.h  <\/p>\n<pre><code class=\"cpp\">namespace Native {   \tstruct NativeWidgetPrivate; \tclass NativeWidget : public QWidget \t{ \t\tQ_OBJECT \tpublic: \t\tNativeWidget(QWidget *parent = nullptr); \t\tNativeWidget(const QString &wndName, QWidget *parent = nullptr); \t\t~NativeWidget();   \t\tWId nativeHWND() const; \t\tHDC getNativeDC() const; \t\tvoid releaseNativeDC(HDC hdc) const; \t \t\tQString wndName() const;   \tprotected: \t\tNativeWidget(NativeWidgetPrivate *p, const QString &wndName,  \t\t\tQWidget *parent = nullptr); \t\tvoid paintEvent(QPaintEvent *ev) override; \t\tvoid resizeEvent(QResizeEvent *ev) override;  \t\tvirtual bool nativeWinEvent(MSG *msg, long *result); \t\t \t\tQScopedPointer&lt;NativeWidgetPrivate&gt; d_ptr; \tprivate: \t\tvoid init(); \t\tQ_DECLARE_PRIVATE(NativeWidget); \t};  \tvoid NativeWidget::paintEvent(QPaintEvent *ev) \t{ \t\tQ_D(NativeWidget); \t\tSendMessage(d-&gt;m_hwnd, WM_PAINT, 0, 0); \t\tev-&gt;accept(); \t}   \tvoid NativeWidget::resizeEvent(QResizeEvent *ev) \t{ \t\tQ_D(NativeWidget); \t\tconst QSize &sz = ev-&gt;size();   \t\tSetWindowPos(d-&gt;m_hwnd, NULL, 0, 0, sz.width(), sz.height(), 0);   \t\tQWidget::resizeEvent(ev); \t}    } <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 resizeEvent \u0438 paintEvent. \u041e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 QWidget.<br \/>  \u041f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0432\u043e\u0437\u044c\u043c\u0435\u0442 \u043d\u0430 \u0441\u0435\u0431\u044f \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u043c. \u041e\u043d \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 windowsEvent \u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0438\u0445 NativeWidget:: nativeWinEvent, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0432 \u043a\u043b\u0430\u0441\u0441\u0430\u0445-\u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0430\u0445.  <\/p>\n<pre><code class=\"cpp\">namespace Native { \tstruct NativeWidgetPrivate \t{ \t\tNativeWidgetPrivate(NativeWidget *q); \t\t~NativeWidgetPrivate();   \t\tinline HWND winID() const; \t\tHDC getDC() const; \t\tvoid releaseDC(HDC hdc) const;   \t\tQRect windowPlacement() const;   \t\tvirtual bool createWindow(QWidget *parent);   \t\tvoid sendEvent(QEvent *ev); \t\tinline bool isCreating() const { return m_creating; } \t \t\tLRESULT windowsEvent(_In_  HWND hwnd, _In_  UINT msg,  \t\t\t_In_  WPARAM wParam, _In_  LPARAM lParam);   \t\t \t\tHWND m_hwnd; \t\tmutable HDC m_hdc; \t\tbool m_creating;   \t\tvoid sendToWidget(uint msg, WPARAM wparam, LPARAM lparam);   \t\tQString m_wndName;   \t\tNativeWidget *const q_ptr; \t\tQ_DECLARE_PUBLIC(NativeWidget); \t}; } <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0441 \u0432\u0438\u0434\u0435\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f WM_PAINT \u0438 WM_ERASEBACKGROUND. <br \/>  \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u043d\u0438\u0436\u0435:  <\/p>\n<pre><code class=\"cpp\">bool MovieScreen::nativeWinEvent(MSG *msg, long *result)  { \tQ_D(MovieScreen); \t\/\/qDebug() &lt;&lt; __FUNCTION__;   \tswitch (msg-&gt;message) \t{ \tcase WM_ERASEBKGND: \tcase WM_PAINT: \t\td-&gt;updateMovie(); \t\tbreak; \tcase WM_SHOWWINDOW: \t\t{ \t\t\tauto r = NativeWidget::nativeWinEvent(msg, result); \t\t\tif (msg-&gt;wParam == TRUE) \t\t\t\td-&gt;updateMovie(); \t\t\treturn r; \t\t}   \tcase WM_SIZE: \tcase WM_MOVE: \tcase WM_MOVING: \tcase WM_SIZING: \t\t{ \t\t\tauto r = NativeWidget::nativeWinEvent(msg, result); \t\t\td-&gt;resizeVideo(); \t\t\treturn r; \t\t}  \t}     \treturn NativeWidget::nativeWinEvent(msg, result); } <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f:  <\/p>\n<pre><code class=\"cpp\">IVMRWindowlessControl9 *m_pVideoRenderer9;  MovieScreenPrivate:: updateMovie() { \tIf (isPaused()) \t{ \t\tHDC hdc = getHDC(); \t\tm_pVideoRenderer9-&gt;Repaint_Video(winID(), hdc); \t\treleaseHDC(hdc); } } MovieScreenPrivate::resizeVideo() { \tlong lWidth, lHeight;  \tHRESULT hr = m_pVideoRenderer9-&gt;GetNativeVideoSize(&lWidth, &lHeight, NULL, NULL);  \tif (SUCCEEDED(hr)) \t{ \t\tRECT rcSrc, rcDest;  \t\t\t\t \t\t\/\/ Set the source rectangle. \t\tSetRect(&rcSrc, 0, 0, lWidth, lHeight);  \t\t\t\t\t \t\t\/\/ Get the window client area. \t\tGetClientRect(winID(), &rcDest);  \t\t\t\t \t\t\/\/ Set the destination rectangle. \t\tSetRect(&rcDest, 0, 0, rcDest.right, rcDest.bottom);   \t\tm_pVideoRenderer9-&gt;SetVideoPosition(&rcSrc, &rcDest); \t\t\t \t}  } <\/code><\/pre>\n<p>  \u041d\u0443 \u0432\u043e\u0442, \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c:<br \/>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"http:\/\/www.youtube.com\/embed\/6qmkeQdDCXY?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe><br \/>  \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c <a href=\"http:\/\/ompldr.org\/iaHJqbw\">\u0437\u0434\u0435\u0441\u044c<\/a>    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/172869\/\"> http:\/\/habrahabr.ru\/post\/172869\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0417\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0441\u0435\u0439\u0447\u0430\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u0438\u0434\u0435\u043e \u043f\u043e\u0434 Windows. \u0418 \u00ab\u0437\u0430\u0432\u0438\u0441\u00bb \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0434 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u2014 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 Qt, \u0432\u0438\u0434\u0435\u043e \u0432 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043c\u043e\u0440\u0433\u0430\u0442\u044c \u0438 \u0438\u0441\u0447\u0435\u0437\u0430\u0442\u044c (\u0441\u043c. \u0432\u0438\u0434\u0435\u043e).<br \/>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"http:\/\/www.youtube.com\/embed\/o1pXihhQzGE?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe><br \/>  \u041f\u043e\u043f\u044b\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c QWidget::paintEvent \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e Qt \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0437\u0430\u043b\u0438\u0432\u043a\u0443 \u043d\u0430 (https:\/\/qt-project.org\/doc\/qt-4.8\/qwidget.html#autoFillBackground-prop) \u043f\u0435\u0440\u0435\u0434 QWidget::paintEvent. <br \/>  \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c WM_PAINT \u0438 WM_ERASEBACKGOUND \u0432 QWidget::winEvent \u0442\u043e\u0436\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u0430\u0441\u044c, \u0442.\u043a. paintEvent \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 WM_PAINT, \u043d\u043e \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 \u043f\u043e \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c\u0443 \u043c\u043d\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443. <br \/>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u0432\u044b\u0445\u043e\u0434\u0438\u043b \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-172869","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/172869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=172869"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/172869\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=172869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=172869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=172869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}