thank you all for your answers
unfortunatelly nothing worked....
caseChangerClass.h
#ifndef caseChangerClass_H
#define caseChangerClass_H
#include "ui_caseChanger.h"
#include "classA.h"
#include <QDialog>
#include <QMenu>
//class caseChangerClass : public QDialog, private Ui::mainFormCaseChanger
class caseChangerClass
: public QDialog,
private Ui
::mainFormCaseChanger {
Q_OBJECT
//the constructor
public:
caseChangerClass
(QWidget *parent
= 0);
private:
typeA test;
public: void caseChangerClass
::setText( QString text
);
};
#endif
#ifndef caseChangerClass_H
#define caseChangerClass_H
#include "ui_caseChanger.h"
#include "classA.h"
#include <QDialog>
#include <QMenu>
//class caseChangerClass : public QDialog, private Ui::mainFormCaseChanger
class caseChangerClass : public QDialog, private Ui::mainFormCaseChanger
{
Q_OBJECT
//the constructor
public:
caseChangerClass(QWidget *parent = 0);
private:
typeA test;
public: void caseChangerClass::setText( QString text );
};
#endif
To copy to clipboard, switch view to plain text mode
caseChangerClass.cpp
#include "caseChangerClass.h"
#include <QtGui>
#include <QString>
caseChangerClass
::caseChangerClass(QWidget* parent
):QDialog(parent
),test
(this) {
setupUi(this);
}
void caseChangerClass
::setText( QString text
) {
textEdit->setText( text );
}
#include "caseChangerClass.h"
#include <QtGui>
#include <QString>
caseChangerClass::caseChangerClass(QWidget* parent):QDialog(parent),test(this)
{
setupUi(this);
}
void caseChangerClass::setText( QString text )
{
textEdit->setText( text );
}
To copy to clipboard, switch view to plain text mode
classA.h
#ifndef classA_H
#define classA_H
#include "caseChangerClass.h"
class caseChangerClass;
class typeA
{
//the constructor
public:
typeA(caseChangerClass* gui);
~typeA();
caseChangerClass* m_gui;
};
#endif
#ifndef classA_H
#define classA_H
#include "caseChangerClass.h"
class caseChangerClass;
class typeA
{
//the constructor
public:
typeA(caseChangerClass* gui);
~typeA();
caseChangerClass* m_gui;
};
#endif
To copy to clipboard, switch view to plain text mode
classA.cpp
#include "classA.h"
typeA::typeA(caseChangerClass* gui);
{
m_gui = gui;
//this is what i tryied to do earlier....
//m_gui->textEdit->append("hi!");
gui->setText( "HI" );
}
#include "classA.h"
typeA::typeA(caseChangerClass* gui);
{
m_gui = gui;
//this is what i tryied to do earlier....
//m_gui->textEdit->append("hi!");
gui->setText( "HI" );
}
To copy to clipboard, switch view to plain text mode
main.cpp
#include <QApplication>
#include "caseChangerClass.h"
int main(int argc, char *argv[])
{
caseChangerClass myApp;
myApp.setWindowFlags(Qt::WindowStaysOnTopHint);
myApp.show();
return app.exec();
}
#include <QApplication>
#include "caseChangerClass.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
caseChangerClass myApp;
myApp.setWindowFlags(Qt::WindowStaysOnTopHint);
myApp.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
ui_caseChanger.h
/********************************************************************************
** Form generated from reading ui file 'caseChanger.ui'
**
** Created: Mon 2. Apr 20:23:18 2007
** by: Qt User Interface Compiler version 4.2.2
**
** WARNING! All changes made in this file will be lost when recompiling ui file!
********************************************************************************/
#ifndef UI_CASECHANGER_H
#define UI_CASECHANGER_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QTextEdit>
#include <QtGui/QWidget>
class Ui_mainFormCaseChanger
{
public:
void setupUi
(QWidget *mainFormCaseChanger
) {
mainFormCaseChanger
->setObjectName
(QString::fromUtf8("mainFormCaseChanger"));
textEdit
= new QTextEdit(mainFormCaseChanger
);
textEdit
->setObjectName
(QString::fromUtf8("textEdit"));
textEdit
->setGeometry
(QRect(80,
20,
251,
171));
retranslateUi(mainFormCaseChanger);
size = size.expandedTo(mainFormCaseChanger->minimumSizeHint());
mainFormCaseChanger->resize(size);
} // setupUi
void retranslateUi
(QWidget *mainFormCaseChanger
) {
mainFormCaseChanger
->setWindowTitle
(QApplication::translate("mainFormCaseChanger",
"test",
0,
QApplication::UnicodeUTF8));
Q_UNUSED(mainFormCaseChanger);
} // retranslateUi
};
namespace Ui {
class mainFormCaseChanger: public Ui_mainFormCaseChanger {};
} // namespace Ui
#endif // UI_CASECHANGER_H
/********************************************************************************
** Form generated from reading ui file 'caseChanger.ui'
**
** Created: Mon 2. Apr 20:23:18 2007
** by: Qt User Interface Compiler version 4.2.2
**
** WARNING! All changes made in this file will be lost when recompiling ui file!
********************************************************************************/
#ifndef UI_CASECHANGER_H
#define UI_CASECHANGER_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QTextEdit>
#include <QtGui/QWidget>
class Ui_mainFormCaseChanger
{
public:
QTextEdit *textEdit;
void setupUi(QWidget *mainFormCaseChanger)
{
mainFormCaseChanger->setObjectName(QString::fromUtf8("mainFormCaseChanger"));
textEdit = new QTextEdit(mainFormCaseChanger);
textEdit->setObjectName(QString::fromUtf8("textEdit"));
textEdit->setGeometry(QRect(80, 20, 251, 171));
retranslateUi(mainFormCaseChanger);
QSize size(444, 207);
size = size.expandedTo(mainFormCaseChanger->minimumSizeHint());
mainFormCaseChanger->resize(size);
QMetaObject::connectSlotsByName(mainFormCaseChanger);
} // setupUi
void retranslateUi(QWidget *mainFormCaseChanger)
{
mainFormCaseChanger->setWindowTitle(QApplication::translate("mainFormCaseChanger", "test", 0, QApplication::UnicodeUTF8));
Q_UNUSED(mainFormCaseChanger);
} // retranslateUi
};
namespace Ui {
class mainFormCaseChanger: public Ui_mainFormCaseChanger {};
} // namespace Ui
#endif // UI_CASECHANGER_H
To copy to clipboard, switch view to plain text mode
why this doesn't work??
Bookmarks