[Qt-interest] problem on showing the dll gui inherited from qwidget
Kamil Klimek
naresh at tlen.pl
Fri Dec 31 10:22:59 CET 2010
Wiadomość napisana przez hakiim the dream w dniu 2010-12-31, o godz. 10:19:
> Hi, I am implementing a gui inherited from qwidget, as a dll. And below is class definition of my gui class.
> class __declspec(dllexport) myGui : public QWidget, public myInterface{ Q_OBJECT public: myGui(QWidget *parent = 0, Qt::WFlags flags = 0); ~myGui (); void run(); private: //.... }
> The window modality property of the gui is set to Qt::WindowModal.
> The gui class is also implementing a virtual function called run(), which is defined in the interface class.
> To show the gui dll in the caller side, I call show() inside the run implementation.
> The gui dl l raises a debug error with the title ASSERT failure in QVector<T>::at: "index out of range", file c:\iwmake\build_vs2008_opensource_____padding_____\include\qtcore....
> I also tried setVisible(true) istead of show(), but it raised the same error.
> Any solutions to the problem?
Can't you break at this assert and see the backtrace? It will be easier to track down an error. Also note, that show is inline for setVisible(true), so it doesn't matter if you use show or setVisible(true)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101231/f8ca880a/attachment.html
More information about the Qt-interest-old
mailing list