blob: cd3aadac83bd660395c4370d25f62772abacddbb (
plain)
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
|
#pragma once
#include "QtChatTabs.h"
#include <QTabWidget>
#include <QLayout>
namespace Swift {
QtChatTabs::QtChatTabs() {
tabs_ = new QTabWidget(this);
#if QT_VERSION >= 0x040500
//For Macs, change the tab rendering.
tabs_->setDocumentMode(true);
#endif
QVBoxLayout *layout = new QVBoxLayout;
layout->setSpacing(0);
layout->setContentsMargins(0, 3, 0, 0);
layout->addWidget(tabs_);
setLayout(layout);
resize(400, 300);
}
void QtChatTabs::addTab(QWidget* tab) {
tabs_->addTab(tab, tab->windowTitle());
}
void QtChatTabs::tabClosing() {
}
}
|