KUrlRequesterDialog Class

Header: #include <KUrlRequesterDialog>
CMake: find_package(Qt6 REQUIRED COMPONENTS KIOWidgets)
target_link_libraries(mytarget PRIVATE Qt6::KIOWidgets)

Public Functions

KUrlRequesterDialog(const QUrl &url, QWidget *parent = nullptr)
KUrlRequesterDialog(const QUrl &url, const QString &text, QWidget *parent)
virtual ~KUrlRequesterDialog() override
QUrl selectedUrl() const
KUrlRequester *urlRequester()

Static Public Members

QUrl getUrl(const QUrl &url = QUrl(), QWidget *parent = nullptr, const QString &title = QString())

Detailed Description

@class KUrlRequesterDialog kurlrequesterdialog.h <KUrlRequesterDialog>

Dialog in which a user can enter a filename or url. It is a dialog encapsulating KUrlRequester.

@short Simple dialog to enter a filename/url. @author Wilco Greven <greven@kde.org>

Member Function Documentation

[explicit] KUrlRequesterDialog::KUrlRequesterDialog(const QUrl &url, QWidget *parent = nullptr)

Constructs a KUrlRequesterDialog.

@param url The url of the directory to start in. Use QString() to start in the current working directory, or the last directory where a file has been selected. @param parent The parent object of this widget.

KUrlRequesterDialog::KUrlRequesterDialog(const QUrl &url, const QString &text, QWidget *parent)

Constructs a KUrlRequesterDialog.

@param url The url of the directory to start in. Use QString() to start in the current working directory, or the last directory where a file has been selected. @param text Text of the label @param parent The parent object of this widget.

[override virtual noexcept] KUrlRequesterDialog::~KUrlRequesterDialog()

Destructs the dialog.

[static] QUrl KUrlRequesterDialog::getUrl(const QUrl &url = QUrl(), QWidget *parent = nullptr, const QString &title = QString())

Creates a modal dialog, executes it and returns the selected URL.

@param url This specifies the initial path of the input line. @param parent The widget the dialog will be centered on initially. @param title The title to use for the dialog.

QUrl KUrlRequesterDialog::selectedUrl() const

Returns the fully qualified filename.

KUrlRequester *KUrlRequesterDialog::urlRequester()

Returns a pointer to the KUrlRequester.