Remove superflous wxQtPointer helper (and header)

Note that this added a new level of ref counting and the automatic deletion was causing premature destuction of Qt control's children.
Direct destruction of the QObject is even discouraged and can cause chash according Qt docs, so deleteLater() is safer.
For more info see QObject::~QObject comments (Qt source)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use Qt's safer deleteLater() in dtor

Note that the comment was wrong (my mystake), destroy() is protected (and should not be used), deleteLater() is a slot and is the recommended way as it is defferred. Also, it could be called multiple times as Qt manages this in the event queue

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix wxFrame dtor in wxQT (removed)

This could cause the incorrect deletion order of qt children and delete is not safe, either explicit or implicit using wxQtPointer -that also was removed-.
The wxWindow destructor should execute the deleteLater() that is safer in qt (see prior commits).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix scroll bar window/frame in wxQT

Now it is simplified using QScrollArea, so custom scroll layout was removed (that was commented and didn't work)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix scrollable control creation in wxQT

Moved scroll bar creation from SetScrollbar to QtSetScrollBar so it can be called from Create

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix scroll bar creation only for panels

Other controls like wxListBox already include scroll bars (using wxHSCROLL / wxVSCROLL), and should not create / set new ones for them

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix paint issues on scrolled controls in wxQT

Warning reported by qt was related to trying to draw in an invalid painter: QPainter.begin(...) returned False, with the output:

QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1

This can be tested quickly with the scroll sample (nothing is drawn the QScrollArea->viewport() is used.
TLW also has a QScrollArea as central widget, so this should be solved there too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Remove superflous QtPaintClientDCPicture

This is already handled inside QtHandlePaintEvent, so it duplicated some logic and could draw the picture twice (if not introducing conflicts with QPaint).
Need to investigate the cases where this should be really done after the qt paint (maybe it could be related to wxEraseEvent)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Set update region for wxQT paint events

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix scroll window method in wxQT

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Implement native system settings GetColour in wxQT

This was causing incorrect background in paint events and other drawing issues.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxNORMAL_FONT in native system setting

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix wxQT painting to honor background style

Note that although this works better, the internal m_qtPaintBuffer still causes some issues and is inefficient (not needed as Qt already do a double buffering for widget painting)
Also, QWidget::setBackgroundRole et.al. should be enforced too (and tested), to properly handle transparent and system backgrounds

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Implement style background & transparency in wxQT

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Paint directly wxWindowDC without buffer in wxQT

This solution avoid flicker and is more optimal as the intermediate buffer is not need:
 * use QPainter* instead of QImage* in wxWindow paint event (no more m_qtPaintBuffer)
 * change m_qtPainter to pointer in wxQtDCImpl (created on subclasses)
 * rename QtPreparePainter internal method (not used right now)
 * initial erase left to Qt (auto fill background)

Still more tweaks are needed to avoid problems on begin() and test background erasing

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix invalid destruction of painter in wxQT

The DC is not really associated to the window, so the m_qtPainter is owned by this class and should be deleted in base dtor

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Handle central widget paint events in wxQT

Add wxQtCentralWidget helper and fix minor logic in paint event to detect the scrollable area

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix paint of wxClientDC in wxQT

Moved the painter replay inside the paint event, so the erase and paint wx event are processed (wxPaintDC) before actions drawn outside the event handler (wxClientDC).
After this, background was not prepared correctly and the drawing could become inconsistent (specially if the wxClientDC was just used for measures, ie: no drawings)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Avoid painting recursion for wxClientDC in wxQT

Firing a repaint inside a paint ever could be recursive, update() should be used in that case but it is not immediate.
Also, note that now the wxClientDC would work even if it is used inside the paint event, and could be used to simplificate the logic.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't force a repaint if nothing to replay (wxClientDC wxQT)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxQT@77249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775