[Solved] Qt designer program exited with code -1073741515
-
mainwebwindow.cpp
@#include "mainwebwindow.h"
#include "ui_mainwebwindow.h"MainWebWindow::MainWebWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWebWindow)
{
ui->setupUi(this);ui->statusBar->setStatusTip("Loading..."); ui->statusBar->showMessage("Loading...",1000); connect(ui->mainView, SIGNAL(loadFinished(bool)), this, SLOT(initialPage(bool))); connect(ui->mainView, SIGNAL(loadProgress(int)), this, SLOT(setValue(int))); ui->mainView->setUrl(QUrl(QString("http://www.showrush.com/client/index.php"))); ui->mainView->setContextMenuPolicy(Qt::PreventContextMenu); connect(ui->mainView->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(populateJavaScriptWindowObject()));
}
MainWebWindow::~MainWebWindow()
{
delete ui;
}void MainWebWindow::resizeEvent(QResizeEvent *) {
ui->mainView->move(0,0);
ui->mainView->resize(ui->centralWidget->width(),ui->centralWidget->height());
}void MainWebWindow::initialPage(bool good) {
good = true;
ui->statusBar->setStatusTip("Done");
ui->statusBar->showMessage("Done",5000);
this->setWindowTitle(ui->mainView->title());
}void MainWebWindow::setValue(int progress) {
ui->statusBar->setStatusTip("Loading...\t"+QString().setNum(progress)+"%");
ui->statusBar->showMessage("Loading...\t"+QString().setNum(progress)+"%",1000);
}
void MainWebWindow::populateJavaScriptWindowObject() {
ui->mainView->page()->mainFrame()->addToJavaScriptWindowObject("login", this);
}bool MainWebWindow::submit() {
QWebFrame *frame = ui->mainView->page()->mainFrame();QWebElement username = frame->findFirstElement("#username"); QWebElement password = frame->findFirstElement("#password"); QWebElement submit = frame->findFirstElement("#submit"); return false;
}
void MainWebWindow::on_LogMessage(QString S){
qDebug() << "log: "<<S;
}
@qskclasses.h
@#ifndef QSKCLASSES_H
#define QSKCLASSES_H//class MainWebWindow;
#include "mainwebwindow.h"
class QSKSignalDispatcher : public QObject
{
Q_OBJECTpublic:
void ConnectToUI();
explicit QSKSignalDispatcher(MainWebWindow *window);
void log(QString S);
~QSKSignalDispatcher();signals:
void SendToLogSignal (QString);private:
MainWebWindow *mainFrame;};
#endif // QSKCLASSES_H
@qskclasses.cpp
@#include "qskclasses.h"
#include <QObject>void QSKSignalDispatcher::ConnectToUI()
{
// Connecting signals from SkypeKit side (dispatcher) to GUI side (mainForm)
QObject::connect (
this, SIGNAL (SendToLogSignal(QString)),
this->mainFrame, SLOT (on_LogMessage(QString))
);
};QSKSignalDispatcher::QSKSignalDispatcher(MainWebWindow *window) : QObject()
{
this->mainFrame = window;
this->log("SignalDispatcher created");
}void QSKSignalDispatcher::log(QString S) {
emit SendToLogSignal(S);
}QSKSignalDispatcher::~QSKSignalDispatcher()
{
delete this;
}@
-
So, when you run it in a debugger, where in your code does it show the error is occurring?
-
i tried doing qDebug() << "startup" at the start of the main.cpp but it wasnt shown in the console when i debug it it just quits when i start it up.
-
Is your main.cpp compiled without error/warning as you have posted above?
-
yes it is compile error-free and not even warnings, i did have one when i wanted to implement skype but that was because fopen() was unsafe, but i dont have this code in anymore and it is completely error/warning free
-
Well, in starting your thread you have posted:
[quote author="Eastborn" date="1329839165"]
main.cpp
@#include <QtGui/QApplication>
#include "mainwebwindow.h"
#include "qskclasses.h"MainWebWindow* mainForm = 0;
QSKSignalDispatcher* dispatcher = 0;int main(int argc, char *argv[])
{
QApplication a(argc, argv);mainForm = new MainWebWindow(); dispatcher = new QSKSignalDispatcher(mainForm); dispatcher->ConnectToUI(); mainForm->show(); #ifdef WIN32 QString runtimePath = "..//..//..//Skypekit//bin//windows-x86-skypekit.exe"; #endif #ifdef __APPLE__ QString runtimePath = "..//..//..//Skypekit//bin//windows-x86-skypekit.exe"; #endif #ifdef __linux__ QString runtimePath = "..//..//..//Skypekit//bin//windows-x86-skypekit.exe"; #endif QProcess runtime; if (!runtime.startDetached(runtimePath)) { qDebug() <<"ERROR: Unable to execute " + runtimePath; } else { return a.exec(); }
}
@
[/quote]Not all return pathes are providing a return value. So, I would expect at least a warning, when it is not an error.
So, the information posted may be inconsistent.
From your post I understand that you are not even been able to see the output. You may want to check also that your main is the main you are thinking it is.Anyhow, I would suggest to eliminate functionality by commenting out. You have to vary until you find the source of problem.
-
i got it fixed, it were dlls that were missing in the debug folder...
sorry to bother anyone here
and thanks for your support -
You are welcome
All people go through such experiences. ;-)
Please remember marking your thread with [solved] in the title next time. I have done it for you.
-
sorry my friends
I have this problem too
I build my application in Qt creator but I cannot run it.
Can you help me in detail because I am new comer in Qt and opencv ...which dll and where should I add to oveercome this problem? thanks a lot in advance...
Error isStarting F:\Qts\Test1\Test1-build-desktop-Qt_4_8_1_for_Desktop_-MinGW__Qt_SDK__Debug\debug\Test1.exe...
The program has unexpectedly finished.
F:\Qts\Test1\Test1-build-desktop-Qt_4_8_1_for_Desktop-_MinGW__Qt_SDK__Debug\debug\Test1.exe exited with code -1073741819 -
you have to put the necessary third party library dll files beside your exe file.