Hi,
I would like to know is there any way to launch the application in the main window it self, instead of opening a new window.
what are the challenges in doing so, i googled and found out some sample , but its not working.
#include <QtGui/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
MainWindow w;
w.show();
return a.exec();
}
#include <QtGui/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
To copy to clipboard, switch view to plain text mode
#include "mainwindow.h"
#include <QProcess>
MainWindow
::MainWindow(QWidget *parent
) {
//proc->start("Artha");// -into"+QString((int)this->winId()));
proc
->start
("Artha -into"+QString((int)parent
->winId
()));
}
MainWindow::~MainWindow()
{
}
#include "mainwindow.h"
#include <QProcess>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
{
QProcess * proc = new QProcess(this);
//proc->start("Artha");// -into"+QString((int)this->winId()));
proc->start("Artha -into"+QString((int)parent->winId()));
}
MainWindow::~MainWindow()
{
}
To copy to clipboard, switch view to plain text mode
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtGui/QMainWindow>
{
Q_OBJECT
public:
~MainWindow();
};
#endif // MAINWINDOW_H
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtGui/QMainWindow>
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
};
#endif // MAINWINDOW_H
To copy to clipboard, switch view to plain text mode
Bookmarks