File indexing completed on 2024-11-10 04:48:57
0001 /* 0002 This file is part of libkdepim. 0003 0004 SPDX-FileCopyrightText: 2010 David Faure <faure@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #include <QApplication> 0010 #include <QCommandLineParser> 0011 #include <QStandardPaths> 0012 0013 #include "widgets/kcheckcombobox.h" 0014 0015 int main(int argc, char *argv[]) 0016 { 0017 QApplication app(argc, argv); 0018 QCommandLineParser parser; 0019 QStandardPaths::setTestModeEnabled(true); 0020 parser.addVersionOption(); 0021 parser.addHelpOption(); 0022 parser.process(app); 0023 0024 auto combo = new KPIM::KCheckComboBox(nullptr); 0025 combo->addItems(QStringList() << QStringLiteral("KDE") << QStringLiteral("Mac OSX") << QStringLiteral("Windows") << QStringLiteral("XFCE") 0026 << QStringLiteral("FVWM") << QStringLiteral("TWM")); 0027 combo->setCheckedItems(QStringList() << QStringLiteral("KDE") << QStringLiteral("Mac OSX") << QStringLiteral("Windows")); 0028 combo->resize(400, 20); 0029 combo->setSqueezeText(true); 0030 combo->setDefaultText(QStringLiteral("Default text")); 0031 combo->show(); 0032 0033 return app.exec(); 0034 }