So I have a button, a combo box, and a table widget in a qwidget that’s setup
(seupUI) with a QWinWidget as a parameter:
win = new QWinWidget(handle); winId = win->winId(); Ui::Form ui;
ui.setupUi(win);
The “handle” is the HWND from a win32 window. When I click on the combo I don’t
get a popup showing the combo contents (in this case, 3 strings:
“one”,“two”,“three”. which I set up in designer), but I can see the combo has
the focus. I click once more and it loses the focus (still no popup). Click it
a third time and it crashes. The call stack is show below.
> QtCored4.dll!qt_message_output(QtMsgType msgType=QtFatalMsg, const char *
> buf=0x02ab2bc0) Line 2247 C++ QtCored4.dll!qt_message(QtMsgType
> msgType=QtFatalMsg, const char * msg=0x672a35e8, char * ap=0x0018d42c) Line
> 2305 + 0x12 bytes C++ QtCored4.dll!qFatal(const char * msg=0x672a35e8, ...)
> Line 2488 + 0xf bytes C++ QtCored4.dll!qt_assert(const char *
> assertion=0x65a2b954, const char * file=0x65a2b93c, int line=114) Line 2004
> + 0x16 bytes C++ QtGuid4.dll!QNativeImage::QNativeImage(int
> width=-1651032721, int height=1624765, QImage::Format format=Format_RGB32,
> bool isTextBuffer=false, QWidget * __formal=0x029ce3d0) Line 114 + 0x1b
> bytes C++ QtGuid4.dll!QRasterWindowSurface::prepareBuffer(QImage::Format
> format=Format_RGB32, QWidget * widget=0x029ce3d0) Line 378 + 0x34 bytes C++
> QtGuid4.dll!QRasterWindowSurface::setGeometry(const QRect & rect={...}) Line
> 325 C++ QtGuid4.dll!QWidgetBackingStore::releaseBuffer() Line 279 C++
> QtGuid4.dll!QWidgetPrivate::hide_sys() Line 1078 C++
> QtGuid4.dll!QWidgetPrivate::hide_helper() Line 7445 C++
> QtGuid4.dll!QWidget::setVisible(bool visible=false) Line 7629 C++
> QtGuid4.dll!QWidget::hide() Line 491 + 0x16 bytes C++
> QtGuid4.dll!QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode
> mode=CloseWithEvent) Line 7764 C++ QtGuid4.dll!QWidget::close() Line 7823
> C++ QtGuid4.dll!QtWndProc(HWND__ * hwnd=0x00150c7a, unsigned int message=28,
> unsigned int wParam=0, long lParam=9560) Line 2000 + 0xb bytes C++
A second kind of crash…If I click directly on the down arrow at the right of
the combo box it immediately crashes. Here’s the stack:
> QtGuid4.dll!QWidgetPrivate::drawWidget(QPaintDevice * pdev=0x00000000, const
> QRegion & rgn={...}, const QPoint & offset={...}, int flags=5, QPainter *
> sharedPainter=0x00000000, QWidgetBackingStore * backingStore=0x02870608)
> Line 5376 + 0x3 bytes C++ QtGuid4.dll!QWidgetBackingStore::sync() Line 1331
> C++ QtGuid4.dll!QWidgetPrivate::syncBackingStore() Line 1808 C++
> QtGuid4.dll!QWidget::event(QEvent * event=0x0286dd00) Line 8481 C++
> QtGuid4.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x0286e4b8,
> QEvent * e=0x0286dd00) Line 4396 + 0x11 bytes C++
> QtGuid4.dll!QApplication::notify(QObject * receiver=0x0286e4b8, QEvent *
> e=0x0286dd00) Line 4361 + 0x10 bytes C++
> QtCored4.dll!QCoreApplication::notifyInternal(QObject * receiver=0x0286e4b8,
> QEvent * event=0x0286dd00) Line 732 + 0x15 bytes C++
> QtCored4.dll!QCoreApplication::sendEvent(QObject * receiver=0x0286e4b8,
> QEvent * event=0x0286dd00) Line 215 + 0x39 bytes C++
> QtCored4.dll!QCoreApplicationPrivate::sendPostedEvents(QObject *
> receiver=0x00000000, int event_type=0, QThreadData * data=0x0289de30) Line
> 1373 + 0xd bytes C++ QtCored4.dll!qt_internal_proc(HWND__ * hwnd=0x008f0d26,
> unsigned int message=1025, unsigned int wp=0, long lp=0) Line 503 + 0x10
> bytes C++
I'm using Qt version 4.7.1, compiling with visual studio 2008, the qwinwidget
is from Qt/MFC Migration Framework v2.8.
I know it has something to with the QWinWidget, but I don’t know what the
problem is (considering that the button and table work just fine). Can anyone
give me any guidance or their thoughts on this?
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest