#ifndef CORE_H
#define CORE_H
#include <QtGui/QMainWindow>
#include <QSystemTrayIcon>
#include <QAction>
typedef unsigned char bytearray;
namespace Ui
{
class desktop;
class newdevice;
}
{
Q_OBJECT
Q_ENUMS(size)
Q_ENUMS(address)
public:
void devicestatus();
void newdevice();
void converttochar(bytearray a[], int n,char names[][9]);
~desktop();
private slots:
void readdata();
void getLineEditText();
void identityreaddata();
void senddata();
void writedata
(QString byte,
int size
);
void time();
void intialsetup();
private:
Ui::desktop *ui;
};
#endif // CORE_H
#ifndef CORE_H
#define CORE_H
#include <QtGui/QMainWindow>
#include <QSystemTrayIcon>
#include <QAction>
typedef unsigned char bytearray;
namespace Ui
{
class desktop;
class newdevice;
}
class desktop : public QMainWindow
{
Q_OBJECT
Q_ENUMS(size)
Q_ENUMS(address)
public:
desktop(QWidget *parent = 0);
void devicestatus();
void newdevice();
void converttochar(bytearray a[], int n,char names[][9]);
~desktop();
private slots:
void readdata();
void getLineEditText();
void identityreaddata();
void senddata();
void writedata(QString byte,int size);
void time();
void intialsetup();
void iconActivated( QSystemTrayIcon::ActivationReason reason );
private:
Ui::desktop *ui;
};
#endif // CORE_H
To copy to clipboard, switch view to plain text mode
this is my core.h file.
void desktop::intialsetup()
{
createActions();
devicestatus();
writedata(byte,9);
newdevice();
}
void desktop::intialsetup()
{
createActions();
devicestatus();
writedata(byte,9);
newdevice();
}
To copy to clipboard, switch view to plain text mode
this is where i call the newdevice() first.
What i need now is that, when the user click on the menubar->file->settings, this newdevice has to popup again.
How can i create dlg on heap?
connect(ui->actionSettings, SIGNAL(triggered()), &dlg, SLOT(newdevice()));
connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(newdevice()));
connect(ui->actionSettings, SIGNAL(triggered()), &dlg, SLOT(newdevice()));
connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(newdevice()));
To copy to clipboard, switch view to plain text mode
this doesnt work
Bookmarks