Commit 5c7ba327 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use QSplitter

parent 1d7bd383
......@@ -24,25 +24,19 @@
#include "addresseslocationwidget.h"
#include "addresseslocationviewer.h"
#include "addresslocationwidget.h"
#include <QHBoxLayout>
AddressesLocationWidget::AddressesLocationWidget(QWidget *parent)
: QWidget(parent)
: QSplitter(parent)
{
QHBoxLayout *topLayout = new QHBoxLayout;
topLayout->setMargin(0);
AddressLocationWidget *addressLocationWidget = new AddressLocationWidget(this);
addWidget(addressLocationWidget);
addressLocationWidget->setObjectName(QStringLiteral("addresslocationwidget"));
topLayout->addWidget(addressLocationWidget);
mAddressesLocationViewer = new AddressesLocationViewer(this);
mAddressesLocationViewer->setObjectName(QStringLiteral("addresseslocationviewer"));
topLayout->addWidget(mAddressesLocationViewer);
addWidget(mAddressesLocationViewer);
connect(mAddressesLocationViewer, &AddressesLocationViewer::modifyAddress, addressLocationWidget, &AddressLocationWidget::slotModifyAddress);
connect(addressLocationWidget, &AddressLocationWidget::addNewAddress, mAddressesLocationViewer, &AddressesLocationViewer::addAddress);
setLayout(topLayout);
}
AddressesLocationWidget::~AddressesLocationWidget()
......
......@@ -24,10 +24,10 @@
#ifndef ADDRESSESLOCATIONWIDGET_H
#define ADDRESSESLOCATIONWIDGET_H
#include <QWidget>
#include <QSplitter>
#include <KContacts/Address>
class AddressesLocationViewer;
class AddressesLocationWidget : public QWidget
class AddressesLocationWidget : public QSplitter
{
Q_OBJECT
public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment