Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

[[qanda:topic_unsolved]] WebEngine FileDialog Request accept dialog

$
0
0

I searched in qt sources and in 'qquickwebenginedialogrequests.cpp' file i found this functions :

void QQuickWebEngineFileDialogRequest::dialogAccept(const QStringList &files)
{
    m_accepted = true;
    QSharedPointer<FilePickerController> controller = m_controller.toStrongRef();
    if (controller)
        controller->accepted(files);
}


void QQuickWebEngineFileDialogRequest::dialogReject()
{
    m_accepted = true;
    QSharedPointer<FilePickerController> controller = m_controller.toStrongRef();
    if (controller)
        controller->rejected();
}

I can reject WebEngineView file dialog launched by file dialog request by calling this:

QMetaObject::invokeMethod(upload, "dialogReject");

But i don't know how to accept that,
I tried

QMetaObject::invokeMethod(upload, "dialogAccept",Q_ARG(QString,path));

but didn't worked.
What should I do?


Viewing all articles
Browse latest Browse all 13965

Trending Articles