Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QFileOpenEvent class provides an event that will be sent when there is a request to open a file or a URL. More...
#include <qevent.h>
Public Member Functions | |
QFileOpenEvent (const QString &file) | |
QFileOpenEvent (const QUrl &url) | |
QString | file () const |
Returns the name of the file that the application should open. | |
QUrl | url () const |
Returns the url that the application should open. | |
Public Member Functions inherited from QEvent | |
QEvent (Type type) | |
Constructs an event object of type type. | |
virtual | ~QEvent () |
Destroys the event. | |
Type | type () const |
Returns the event type. | |
bool | spontaneous () const |
Returns true if the event originated outside the application (a system event); otherwise returns false . | |
virtual void | setAccepted (bool accepted) |
bool | isAccepted () const |
void | accept () |
Sets the accept flag of the event object, the equivalent of calling setAccepted(true). | |
void | ignore () |
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). | |
bool | isInputEvent () const noexcept |
bool | isPointerEvent () const noexcept |
bool | isSinglePointEvent () const noexcept |
virtual QEvent * | clone () const |
Creates and returns an identical copy of this event. | |
The QFileOpenEvent class provides an event that will be sent when there is a request to open a file or a URL.
\inmodule QtGui
File open events will be sent to the QApplication::instance() when the operating system requests that a file or URL should be opened. This is a high-level event that can be caused by different user actions depending on the user's desktop environment; for example, double clicking on an file icon in the Finder on \macos.
This event is only used to notify the application of a request. It may be safely ignored.
|
explicit |
Constructs a file open event for the given file.
Definition at line 3612 of file qevent.cpp.
|
explicit |
Constructs a file open event for the given url.
Definition at line 3622 of file qevent.cpp.
|
inline |
|
inline |