QtWebEngine colorChooser

  • Why is not possible detect colorChooser such as fileChooser and javascript dialogs? I want to create a web browser with custom functions in user dialogs. In Qml it's possible but i prefer use C++.

  • Hi, and welcome to the forum. Please post a few lines of code so we can understand what you're trying to achieve.

  • Thank you! If i want implement a custom fileChooser, the solution is simple:

    class Page : public QWebEnginePage
            WebView(QWidget *parent = nullptr);
            chooseFiles(FileSelectionMode mode, const QStringList &oldFiles, const QStringList &mimeTypes) override;

    And after set QWebEnginePage with method setPage() to WebEngineView.
    It's possible implement a color chooser dialog? In QML this is possilble:

    WebEngineView {
         onColorDialogRequested: function(request){
            // rest of the code

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.