diff --git a/examples/widgets/richtext/textedit/textedit.pro b/examples/widgets/richtext/textedit/textedit.pro
index c32bf68..4482dd2 100644
--- a/examples/widgets/richtext/textedit/textedit.pro
+++ b/examples/widgets/richtext/textedit/textedit.pro
@@ -1,4 +1,5 @@
 QT += widgets
+CONFIG+=console
 qtHaveModule(printsupport): QT += printsupport
 
 TEMPLATE        = app
diff --git a/examples/widgets/widgets/imageviewer/imageviewer.pro b/examples/widgets/widgets/imageviewer/imageviewer.pro
index 2853f16..1342fc7 100644
--- a/examples/widgets/widgets/imageviewer/imageviewer.pro
+++ b/examples/widgets/widgets/imageviewer/imageviewer.pro
@@ -1,6 +1,6 @@
 QT += widgets
 qtHaveModule(printsupport): QT += printsupport
-
+CONFIG+=console
 HEADERS       = imageviewer.h
 SOURCES       = imageviewer.cpp \
                 main.cpp
diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp
index d8ccccd..4b2eb20 100644
--- a/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -301,6 +301,13 @@ static bool qt_read_dibv5(QDataStream &s, QImage &image)
 
 //#define QMIME_DEBUG
 
+QDebug operator<<(QDebug d, const FORMATETC & tc)
+{
+    d << "FORMATETC(cfFormat=" << tc.cfFormat << ",dwAspect=" << tc.dwAspect
+      << ",lindex=" << tc.lindex << ",tymed=" << tc.tymed << ')';
+    return d;
+}
+
 // helpers for using global memory
 
 static int getCf(const FORMATETC &formatetc)
@@ -372,12 +379,14 @@ static QByteArray getData(int cf, IDataObject *pDataObj, int lindex = -1)
 
 static bool canGetData(int cf, IDataObject * pDataObj)
 {
+    bool rc = true;
     FORMATETC formatetc = setCf(cf);
      if (pDataObj->QueryGetData(&formatetc) != S_OK){
         formatetc.tymed = TYMED_ISTREAM;
-        return pDataObj->QueryGetData(&formatetc) == S_OK;
+        rc = pDataObj->QueryGetData(&formatetc) == S_OK;
     }
-    return true;
+     qDebug() << __FUNCTION__ << cf << "returns" << rc;
+    return rc;
 }
 
 /*!
@@ -984,6 +993,7 @@ private:
 QWindowsMimeImage::QWindowsMimeImage()
 {
     CF_PNG = RegisterClipboardFormat(L"PNG");
+    qDebug() << "CF_PNG" << CF_PNG;
 }
 
 QVector<FORMATETC> QWindowsMimeImage::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
@@ -996,19 +1006,23 @@ QVector<FORMATETC> QWindowsMimeImage::formatsForMime(const QString &mimeType, co
             formatetcs += setCf(CF_DIBV5);
         formatetcs += setCf(CF_DIB);
     }
+    qDebug() << __FUNCTION__ << mimeType << formatetcs;
     return formatetcs;
 }
 
 QString QWindowsMimeImage::mimeForFormat(const FORMATETC &formatetc) const
 {
     int cf = getCf(formatetc);
+    QString r ;
     if (cf == CF_DIB || cf == CF_DIBV5 || cf == int(CF_PNG))
-       return QStringLiteral("application/x-qt-image");
-    return QString();
+       r = QStringLiteral("application/x-qt-image");
+    qDebug() << __FUNCTION__ << "cf=" << cf << "returns" << r;
+    return r;
 }
 
 bool QWindowsMimeImage::canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const
 {
+    qDebug() << __FUNCTION__ << "paste" << mimeType;
     if (mimeType == QLatin1String("application/x-qt-image") &&
         (canGetData(CF_DIB, pDataObj) || canGetData(CF_PNG, pDataObj)))
         return true;
@@ -1016,7 +1030,7 @@ bool QWindowsMimeImage::canConvertToMime(const QString &mimeType, IDataObject *p
 }
 
 bool QWindowsMimeImage::canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const
-{
+{    
     int cf = getCf(formatetc);
     if (!mimeData->hasImage())
         return false;
@@ -1025,12 +1039,15 @@ bool QWindowsMimeImage::canConvertFromMime(const FORMATETC &formatetc, const QMi
         return false;
     // QTBUG-11463, deny CF_DIB support for images with alpha to prevent loss of
     // transparency in conversion.
-    return cf == CF_DIBV5 || (cf == CF_DIB && !image.hasAlphaChannel());
+    bool rc  = cf == CF_DIBV5 || (cf == CF_DIB && !image.hasAlphaChannel());
+    qDebug() << __FUNCTION__ << "copy cf=" << cf << "hasA" << image.hasAlphaChannel() << "returns" <<rc;
+    return rc;
 }
 
 bool QWindowsMimeImage::convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const
 {
     int cf = getCf(formatetc);
+    qDebug() << __FUNCTION__ << "copy cf=" <<cf;
     if ((cf == CF_DIB || cf == CF_DIBV5) && mimeData->hasImage()) {
         QImage img = qvariant_cast<QImage>(mimeData->imageData());
         if (img.isNull())
@@ -1040,11 +1057,13 @@ bool QWindowsMimeImage::convertFromMime(const FORMATETC &formatetc, const QMimeD
             if (img.format() > QImage::Format_ARGB32)
                 img = img.convertToFormat(QImage::Format_RGB32);
             const QByteArray ba = writeDib(img);
+            qDebug() << __FUNCTION__ << "CF_DIB";
             if (!ba.isEmpty())
                 return setData(ba, pmedium);
         } else {
             QDataStream s(&ba, QIODevice::WriteOnly);
             s.setByteOrder(QDataStream::LittleEndian);// Intel byte order ####
+            qDebug() << __FUNCTION__ << "CF_DIB5";
             if (qt_write_dibv5(s, img))
                 return setData(ba, pmedium);
         }
@@ -1076,6 +1095,7 @@ bool QWindowsMimeImage::hasOriginalDIBV5(IDataObject *pDataObj) const
 
 QVariant QWindowsMimeImage::convertToMime(const QString &mimeType, IDataObject *pDataObj, QVariant::Type preferredType) const
 {
+    qDebug() << __FUNCTION__ << mimeType << preferredType;
     Q_UNUSED(preferredType);
     QVariant result;
     if (mimeType != QStringLiteral("application/x-qt-image"))
@@ -1088,6 +1108,7 @@ QVariant QWindowsMimeImage::convertToMime(const QString &mimeType, IDataObject *
         QDataStream s(&data, QIODevice::ReadOnly);
         s.setByteOrder(QDataStream::LittleEndian);
         if (qt_read_dibv5(s, img)) { // #### supports only 32bit DIBV5
+            qDebug() << __FUNCTION__ << "read CF_DIBV5";
             return img;
         }
     }
@@ -1096,16 +1117,20 @@ QVariant QWindowsMimeImage::convertToMime(const QString &mimeType, IDataObject *
         QImage img;
         QByteArray data = getData(CF_PNG, pDataObj);
         if (img.loadFromData(data, "PNG")) {
+            qDebug() << __FUNCTION__ << "read PNG";
             return img;
         }
     }
     //Fallback to DIB
     if (canGetData(CF_DIB, pDataObj)) {
         const QImage img = readDib(getData(CF_DIB, pDataObj));
-        if (!img.isNull())
+        if (!img.isNull()) {
+            qDebug() << __FUNCTION__ << "read DIB";
             return img;
+        }
     }
     // Failed
+    qDebug() << __FUNCTION__ << "FAIL!";
     return result;
 }
 #endif
@@ -1511,6 +1536,7 @@ QVector<FORMATETC> QWindowsMimeConverter::allFormatsForMime(const QMimeData *mim
             formatics += m_mimes.at(i)->formatsForMime(formats.at(f), mimeData);
     }
 #endif //QT_NO_DRAGANDDROP
+    qDebug() << __FUNCTION__ << mimeData->formats() << "returns" << formatics;
     return formatics;
 }
 
