Hello. I am writing a small client VC and I need to open a site for authorization for confirmation. The program worked fine, then it started to crash. Having tracked where it crashes, I realized that it was:

LoginWidget::LoginWidget(const QUrl &url, QWidget *parent) : QDialog(parent) { QWebEngineView *view = new QWebEngineView(this); view->load(url); 

Without this fragment, the program opens, but does not load the browser (which is quite logical). The strange thing is that this is found in Debug, in Release everything is working fine. And yes, under Linux everything also works fine, both in Release and in Debug. There are strange errors in the output (sometimes refer to nonexistent paths): http://pastebin.com/NBycjh20

Briefly, how the program works (I can’t post the whole program, it won’t fit): There is a class for authorization, it accepts application code, forms an url for authorization, accepts a token from a browser, etc. We create a link to the class object with this browser, and open it. Call connect for signal processing by slot and authorization class.

 LoginWidget *wgt = new LoginWidget(url); connect(wgt, SIGNAL(authorized(QString,QString,QString)), SLOT(tokenReceived(QString,QString,QString))); wgt->exec(); 

And that's all. I hope I explained it normally, but I can provide a link to the github with the project, if required. What have I done wrong?

    1 answer 1

    The QWebEngineView widget QWebEngineView to be "put" on the LoginWidget , as an example, like this:

     LoginWidget::LoginWidget(const QUrl &url, QWidget *parent) : QDialog(parent) { QWebEngineView *view = new QWebEngineView(); QVBoxLayout *L = new QVBoxLayout(); L->addWidget(view); setLayout(L); view->load(url); 

    Check there is no, check with yourself.

    • Does not work. Although I previously had it in QGridLayout (forgot to mention). - Desmond Fox