Skip to content

PythonQt.QtGui.QFileOpenEvent · declarations 001

Back to PythonQt.QtGui.QFileOpenEvent

file

file() -> str

X.file() -> str

Supplemental documentation: Qt 5 reference:

QString QFileOpenEvent::file() const

Returns the file that is being opened.

Upstream PySide2 reference signatures (binding differences may apply):

file(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qfileopenevent.html#file

openFile

openFile(file: Any, arg1: flags) -> bool

X.openFile(file, flags) -> bool

Supplemental documentation: Qt 5 reference:

bool QFileOpenEvent::openFile(QFile \&file, QIODevice::OpenMode flags) const

Opens a QFile on the file referenced by this event in the mode specified by flags. Returns true if successful; otherwise returns false.

This is necessary as some files cannot be opened by name, but require specific information stored in this event.

This function was introduced in Qt 4.8.

Upstream PySide2 reference signatures (binding differences may apply):

openFile(self, file: PySide2.QtCore.QFile, flags: PySide2.QtCore.QIODevice.OpenMode) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qfileopenevent.html#openFile

url

url() -> Any

X.url() -> PythonQt.QtCore.QUrl

Supplemental documentation: Qt 5 reference:

QUrl QFileOpenEvent::url() const

Returns the url that is being opened.

This function was introduced in Qt 4.6.

Upstream PySide2 reference signatures (binding differences may apply):

url(self) -> PySide2.QtCore.QUrl

Source: https://doc.qt.io/archives/qt-5.15/qfileopenevent.html#url