W jaki sposób otworzyć subokno programu np. konfiguracji lub administracji grupami?
Część mainwindow.cpp:
#include "_teamslist.cpp"
void MainWindow::teamsList()
{
teamsList tL;
tL.show();
}
_teamslist.cpp:
#include "_teamslist.h"
#include "ui__teamslist.h"
teamsList::teamsList(QWidget *parent) :
QWidget(parent),
ui(new Ui::teamsList)
{
ui->setupUi(this);
this->setWindowTitle(lng.teamsListTitle);
}
teamsList::~teamsList()
{
delete ui;
}
void teamsList::changeEvent(QEvent *e)
{
QWidget::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}
_teamslist.h:
#ifndef _TEAMSLIST_H
#define _TEAMSLIST_H
#include <QtGui/QWidget>
namespace Ui {
class teamsList;
}
class teamsList : public QWidget {
Q_OBJECT
public:
teamsList(QWidget *parent = 0);
~teamsList();
protected:
void changeEvent(QEvent *e);
private:
Ui::teamsList *ui;
};
#endif // _TEAMSLIST_H
Efekt:
mainwindow.cpp:92: error: expected ';' before 'tL'
mainwindow.cpp:92: error: statement cannot resolve address of overloaded function
mainwindow.cpp:93: error: 'tL' was not declared in this scope
Co jest źle?