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++.


  • Moderators

    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
    {
        Q_OBJECT
    
         public:
            WebView(QWidget *parent = nullptr);
    
         protected:
            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.