KDirLister Class

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

Public Functions

KDirLister(QObject *parent = nullptr)
virtual ~KDirLister() override
bool autoErrorHandlingEnabled() const
QWidget *mainWindow()
void setMainWindow(QWidget *window)

Reimplemented Protected Functions

virtual void jobStarted(KIO::ListJob *) override

Detailed Description

Subclass of KCoreDirLister which uses QWidgets to show error messages and to associate jobs with windows.

Member Function Documentation

[explicit] KDirLister::KDirLister(QObject *parent = nullptr)

Create a directory lister.

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

Destroy the directory lister.

bool KDirLister::autoErrorHandlingEnabled() const

Check whether auto error handling is enabled. If enabled, it will show an error dialog to the user when an error occurs. It is turned on by default. @return true if auto error handling is enabled, false otherwise @see setAutoErrorHandlingEnabled()

[override virtual protected] void KDirLister::jobStarted(KIO::ListJob *)

Reimplements: KCoreDirLister::jobStarted(KIO::ListJob *).

Reimplemented to associate a window with new jobs @reimp

QWidget *KDirLister::mainWindow()

Returns the main window associated with this object. @return the associated main window, or @c nullptr if there is none

See also setMainWindow().

void KDirLister::setMainWindow(QWidget *window)

Pass the main window this object is associated with this is used for caching authentication data @param window the window to associate with, @c nullptr to disassociate

See also mainWindow().