[Qt-interest] Can an Qt Application contain 2 mainwindow?
Vincent Cai
wcai at cypress.com
Thu Sep 22 11:46:30 CEST 2011
Thanks.
The error happens when I try to new b window in other thread.
#include "TSAUtility.h"
TSAUtility::TSAUtility(void) : QThread()
{
DataUtt = NULL;
}
TSAUtility::~TSAUtility()
{
this->terminate();
this->wait();
if(DataUtt)
{
delete DataUtt;
DataUtt = NULL;
}
emit SignUttClose();
}
void TSAUtility::run()
{
DataUtt = new DataUtility();//failed here
DataUtt->show();
while(true)
{
}
}
Do you know why?
-----Original Message-----
From: Konstantin Tokarev [mailto:annulen at yandex.ru]
Sent: 2011年9月22日 17:30
To: Vincent Cai
Cc: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] Can an Qt Application contain 2 mainwindow?
22.09.2011, 13:28, "Vincent Cai" <wcai at cypress.com>:
> Dear all,
>
> I have and GUI application with is based on QMainwindow(a.ui).
>
> And I create the other *.ui which is also based on QMainwindow(b.ui).
>
> When I try to open b window through menu of a window, it fail at initialization:
>
> DataUtility::DataUtility(QWidget*parent):
>
> QMainWindow(parent),
>
> ui(newUi::DataUtility)//fail
>
> {
>
> ui->setupUi(this);
>
> }
>
> Could anybody help?
Qt Application certainly can have > 1 QMainWindow. Search for bug in your code.
--
Regards,
Konstantin
________________________________
This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110922/ed088af3/attachment.html
More information about the Qt-interest-old
mailing list