Commit cc7b98a7 authored by Laurent Montel's avatar Laurent Montel 😁

Add a custom combobox which define minimum width

parent 66b3f6c2
......@@ -45,6 +45,7 @@ set(akonadicontact_editor_utils_SRCS
set(akonadicontact_editor_widgets_SRCS
editor/widgets/kwidgetlister.cpp
editor/widgets/akonadicontactcombobox.cpp
)
set(akonadicontact_editor_generalinfo_phone_SRCS
......
/*
This file is part of Akonadi Contact.
Copyright (C) 2016 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#include "akonadicontactcombobox.h"
using namespace Akonadi;
AkonadiContactComboBox::AkonadiContactComboBox(QWidget *parent)
: QComboBox(parent)
{
}
AkonadiContactComboBox::~AkonadiContactComboBox()
{
}
QSize AkonadiContactComboBox::minimumSizeHint() const
{
return QSize(80, QComboBox::minimumSizeHint().height());
}
/*
This file is part of Akonadi Contact.
Copyright (C) 2016 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef AKONADICONTACTCOMBOBOX_H
#define AKONADICONTACTCOMBOBOX_H
#include <QComboBox>
namespace Akonadi
{
class AkonadiContactComboBox : public QComboBox
{
Q_OBJECT
public:
explicit AkonadiContactComboBox(QWidget *parent = Q_NULLPTR);
~AkonadiContactComboBox();
protected:
QSize minimumSizeHint() const Q_DECL_OVERRIDE;
};
}
#endif // AKONADICONTACTCOMBOBOX_H
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