Originally Posted by
Zlatomir
Show some code from your files (not from auto-generated ui_fromName.h) so that we can see what is going on.
Also Chris post contains a lot more information that helps us help you solve this, and you didn't answer Chris questions, please do.
And use layouts, and don't try to write code in the generated files.
HEADER FILE
#include <QMainWindow>
#include "ui_form.h"
{
Q_OBJECT
public:
Form1();
~Form1();
protected slots:
void function1();
}
#include <QMainWindow>
#include "ui_form.h"
class Form1:public QMainWindow
{
Q_OBJECT
public:
Form1();
~Form1();
protected slots:
void function1();
}
To copy to clipboard, switch view to plain text mode
CPP FILE
#include "form1.h"
#include <QDebug>
#include <QFile>
#include <QTextStream>
#include <QTimer>
#include <QDialog>
#include <QMessageBox>
#include <QStringListModel>
{
connect(ui.action_button, SIGNAL(clicked()), this, SLOT(function1()));
}
void Form1::function1()
{
}
Form1::~Form1()
{
}
#include "form1.h"
#include <QDebug>
#include <QFile>
#include <QTextStream>
#include <QTimer>
#include <QDialog>
#include <QMessageBox>
#include <QStringListModel>
Form1::Form1():QMainWindow(NULL,0)
{
connect(ui.action_button, SIGNAL(clicked()), this, SLOT(function1()));
}
void Form1::function1()
{
}
Form1::~Form1()
{
}
To copy to clipboard, switch view to plain text mode
Bookmarks