File: kfilecustomdialogtest_gui.cpp

package info (click to toggle)
kf6-kio 6.20.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,788 kB
  • sloc: cpp: 101,822; xml: 519; ansic: 215; python: 199; ruby: 60; sh: 21; makefile: 17
file content (37 lines) | stat: -rw-r--r-- 1,017 bytes parent folder | download | duplicates (5)
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
/*
    This file is part of the KDE libraries
    SPDX-FileCopyrightText: 2017 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
    Work sponsored by the LiMux project of the city of Munich

    SPDX-License-Identifier: LGPL-2.0-only
*/

#include "kfilecustomdialog.h"
#include <QApplication>
#include <QLabel>

int main(int argc, char **argv)
{
    QApplication::setApplicationName(QStringLiteral("KFileCustomDialogTest_gui"));
    QApplication app(argc, argv);
    KFileCustomDialog dlg;
    QLabel *lab = new QLabel(QStringLiteral("foo"));
    dlg.setCustomWidget(lab);
    dlg.exec();

    // Save dialog box
    KFileCustomDialog dlg2;
    dlg2.setOperationMode(KFileWidget::Saving);
    lab = new QLabel(QStringLiteral("Second"));
    dlg2.setCustomWidget(lab);
    dlg2.exec();

    // Open dialog box
    KFileCustomDialog dlg3;
    dlg3.setOperationMode(KFileWidget::Opening);
    lab = new QLabel(QStringLiteral("Third"));
    dlg3.setCustomWidget(lab);
    dlg3.exec();

    return 0;
}