From 772d42cad1f14c4c408d30d4bbfb983c2028bb92 Mon Sep 17 00:00:00 2001 From: Mariano Reingart Date: Tue, 6 Jan 2015 07:12:17 +0000 Subject: [PATCH] Added new ctor for wxBitmap using wxCursor for wxQT (similar to wxGTK) This is the implementation that should had been included in r78348 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/qt/bitmap.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/qt/bitmap.cpp b/src/qt/bitmap.cpp index 2265de7aaa..16ab3121d0 100644 --- a/src/qt/bitmap.cpp +++ b/src/qt/bitmap.cpp @@ -219,6 +219,14 @@ wxBitmap::wxBitmap(const wxImage& image, int depth ) m_refData = new wxBitmapRefData(QPixmap::fromImage(ConvertImage(image), flags)); } +wxBitmap::wxBitmap(const wxCursor& cursor) +{ + // note that pixmap could be invalid if is not a pixmap cursor + // also, a wxCursor::GetHandle method could be implemented instead of + // accessing the member variable directly + QPixmap pix = cursor.m_qtCursor.pixmap(); + m_refData = new wxBitmapRefData(pix); +} bool wxBitmap::Create(int width, int height, int depth ) {