-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.cpp
More file actions
executable file
·38 lines (34 loc) · 906 Bytes
/
mainwindow.cpp
File metadata and controls
executable file
·38 lines (34 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDeclarativeEngine>
#include <QDeclarativeComponent>
#include <QDebug>
#include "xmpp.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
qmlRegisterType<Xmpp>("XMPP", 1,0, "XMPP");
ui->qml->setSource( QUrl("qrc:qml/main") );
// ui->qml->setSource( QUrl("/Users/matnel/QtWorkspace/BeanQt2/qml/Bug.qml") );
ui->qml->setFixedHeight(640);
ui->qml->setFixedWidth(360);
ui->centralWidget->setMinimumHeight( ui->qml->height() );
ui->centralWidget->setMaximumWidth( ui->qml->width() );
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::changeEvent(QEvent *e)
{
QMainWindow::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}