7#include <QFileOpenEvent>
38int main(
int argc,
char *argv[])
MyApplication(int &argc, char **argv)
bool event(QEvent *event) override
This virtual function receives events to an object and should return true if the event e was recogniz...
The QApplication class manages the GUI application's control flow and main settings.
static int exec()
Enters the main event loop and waits until exit() is called, then returns the value that was set to e...
bool event(QEvent *) override
\reimp
static void quit()
\threadsafe
The QFileOpenEvent class provides an event that will be sent when there is a request to open a file o...
QUrl url() const
Returns the url that the application should open.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
bool isValid() const
Returns true if the URL is non-empty and valid; otherwise returns false.
QString toLocalFile() const
Returns the path of this URL formatted as a local file path.
QUrl url("example.com")
[constructor-url-reference]
QApplication app(argc, argv)
[0]