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

Unsolved A desktop app to retrieve values from a site and to perform actions such as button clicking

$
0
0

So the admin page of the modem ?


Unsolved Qt 5.6: Flash content cannot enter full screen on QWebEngineView

$
0
0

It is a known limitation. Pepper Flash for some odd reason use a completely separate fullscreen system than the rest of Blink or Chromium, and it integrates badly with QtWebEngine.

If you have control over content, one thing you could probably do, is use HTML5 fullscreen mode to set the embed or object element fullscreen, instead of using the Flash fullscreen.

Unsolved QWebChannel - js: Uncaught ReferenceError: qt is not defined

$
0
0

You are a lifesaver, it worked this way! Now to figure out how to strip and put this code generic because I use around 10 QWebEngineView :)

QWebEngineProfile *profile = new QWebEngineProfile("MyWebChannelProfile", this); QFile webChannelJsFile(":/qtwebchannel/qwebchannel.js"); if( !webChannelJsFile.open(QIODevice::ReadOnly) ) { qDebug() << QString("Couldn't open qwebchannel.js file: %1").arg(webChannelJsFile.errorString()); } else { qDebug() << "OK webEngineProfile"; QByteArray webChannelJs = webChannelJsFile.readAll(); webChannelJs.append( "\n" "var workoutobject" "\n" "new QWebChannel(qt.webChannelTransport, function(channel) {" " workoutobject = channel.objects.workoutobject;" "});" ); QWebEngineScript script; script.setSourceCode(webChannelJs); script.setName("qwebchannel.js"); script.setWorldId(QWebEngineScript::MainWorld); script.setInjectionPoint(QWebEngineScript::DocumentCreation); script.setRunsOnSubFrames(false); profile->scripts()->insert(script); } QWebEnginePage *myPage = new QWebEnginePage(profile, ui->webView_workouts); ui->webView_workouts->setPage(myPage); QWebChannel *channel = new QWebChannel(myPage); ui->webView_workouts->page()->setWebChannel(channel); channel->registerObject("workoutobject", this); ui->webView_workouts->load(QUrl(Environnement::getUrlWorkout()));

And now my .js page doesn't have anything related to Qt, really clean result.
Thanks a lot
Max

Unsolved Why I get two <loadFinished> signal sometimes?

$
0
0

Hi and welcome to devnet,

The upload function of the forum is currently broken. Can you use an other image upload site so we can see them ?

Unsolved QtWebEngineProcess.exe crashed on some pc when the number of QWebEnginePage more than 40.

$
0
0

By the way, chrome run very well on my pc,I open more than 70 page, and it display normal. Just QtWebEngine has this problem.When I open new webengine page, it use too many memory. It troubled me four days, any help will be grateful!

Unsolved Replacement QWebElement?

$
0
0

I am migrating to QWebEngine from QWebKit.
It's going well so far, I am just stuck with the use of QWebElement.

Before I was checking the value of some input field in my webPage.
Is this possible with runJavascript? Can runJavascript return the value of an Input field on a webpage?

Cheers,

Old code:

        QWebElement inputNameElement = ui->webView_createWorkout->page()->mainFrame()->documentElement().findFirst("input[id=\"name-workout\"]");
        QWebElement inputCreatorElement = ui->webView_createWorkout->page()->mainFrame()->documentElement().findFirst("input[id=\"creator-workout\"]");
        QString valueName =  inputNameElement.evaluateJavaScript("this.value").toString();
        QString valueCreator =  inputCreatorElement.evaluateJavaScript("this.value").toString();

        if (valueName.size() == 0 || valueCreator.size() == 0) {
            enabled = false;
        }

        if (enabled) {
            buttonSaveElement.removeAttribute("disabled");
        }
        else {
            buttonSaveElement.setAttribute("disabled", "disabled");
        }

Unsolved Why no flash detected? How to install?

QtWebEngine URL How to use the local file


Which method is used to show a print preview for a web page?

$
0
0

I know this is an common question, but this time i can't solved it.
I want to show a print preview of of a web page ( which long is more than 2 pages) and Qt support class QPrintPreviewDialog to do this task . In the earlier version of Qt i only need to connect the "paintRequest" SIGNAL with the QWebView::print SLOT and it'll be done correctly.
But in the version of Qt 5.7 (and now 5.8 beta) i can't use this method anymore because it have been removed.
I have implemented my own SLOT to show the preview of a web page(which is connected to the paintRequest SIGNAL). The following is what i did:

// print preview current page
void WebView::printPreview(QPrinter *printer){
    QPainter painter(printer);
    painter.setWindow(this->rect());
    this->render(&painter);
}

With the web page long one screen then everything is well. But when the web page is too long, it only shows a partial of the web page with a scroll bar.
Anyone has any idea or solution for it? Thanks.

  • You can import an sample of demo browser in Qt 5.8 beta to be an example of this case.

Failing to set margins when printing to pdf

QWebEngineView stealing keyboard focus?

$
0
0

Hey guys. This might be better suited to the Desktop development forum but I'm not sure. I'll try here first.

Basically I am using a QWebEngineView to preview a webpage that the user is modifying using some simple widgets (for example, modifying text on the web page using a QTextEdit).

It's a live preview so every time a change is made I am reloading the webpage using the QWebEngineView::reload() function (my webpage + resources are stored in a local temp folder).

The problem I have is that when I reload the webpage the QWebEngineView seems to steal keyboard focus. I've tried setting Qt::NoFocus as the focus policy for the QWebEngineView but this did not fix the problem.

Has anyone else had this issue before? Can anyone think of a way to circumvent this? I still want the webpage to be interactable using a mouse and keyboard, I just don't want it to take focus just because the page was reloaded!

WebView-based application

$
0
0

A small question if I may.
If I build a web app using WebView do I have to deploy QtWebEngine with all it's dependencies to run it?

Solved QtWebEnginePage initialization seems to disable CrtDbgReport'ing

$
0
0

Fun update for anyone interested, searching for "breakpad chromium" is much more informative than "disable-breakpad chromium." Apparently "breakpad" is a crash reporting tool used by chromium, which suppresses CRT's ASSERTs when it is active (which is by default).

Pass in "--disable-breakpad" as a commandline argument in the main method (it is detected by the win32 ::GetCommandLineW call), or consider saving the crt report mode before the web engine page initializes, and then restore it immediately afterwards.

Unsolved How to display custom JavaScript control panel in an existing Qt application

$
0
0

Hi! When you say "legacy Qt application", does this mean Qt 4.8.7 or even older?

Unsolved Create plugin for WebEngineView

$
0
0

Hi!

I want to create a plugin (an adblocker) for WebEngineView but I didn't find any information about how to do that, or if it's even possible.
I look the Pepper (flash) plugin but it's used directly into chromium third party.

If someone could just give me some information about this or an other way to block some content into WebEngineView.


Unsolved Paste and Drop woes

$
0
0

Hi all,

I’m testing the WebEngine with Qt 5.7.1 for a few days and i’m a bit disappointed with drag/drop capabilities, cause it seems to work only with texts but not with images …
On OSX 10.9 when i drop a image from a website to the Desktop, the sign ⦸ appears meaning the operation is not possible.
If i do the same thing with TextEdit, the sign + appears but nothing appends, the image is not inserted in the TextEdit document window.
Anyway, if i copy and paste a web page with texts and images, only texts are paste, not the images.

Even with texts, strange things append with TextEdit, for example:

If i do "Paste" :

choose to confirm this by clicking “Install”, then agree to the Terms of Service when requested (feel free to read them thoroughly, we’ll be here)

But it's correct if i do "Paste and Match Style" :

choose to confirm this by clicking “Install”, then agree to the Terms of Service when requested (feel free to read them thoroughly, we’ll be here)

It’s worse with text in french:

 il faut donc télécharger Testdisk ici qui a la particularité de fonctionner sur tous les OS (Linux, macOS et Windows).

With Paste and Match Style, it’s correct but i loose the link :

il faut donc télécharger Testdisk ici qui a la particularité de fonctionner sur tous les OS (Linux, macOS et Windows).

All this sites use UTF-8 charset.

Of course with Safari browser this things don’t occur
and if i remember well, with the Webkit either.

Unsolved Why in WebEngineEngineView Play flash prompt "Couldn’t load Plugin"??

$
0
0

OS X install the latest flash palyer.

Unsolved Paste in WebEngineView

$
0
0

@p3c0 as a fallow up I tried the property you are talking about and it made my app crash (just the addition of that line). I don't know if this is a bug but it happened on qt 5.7.1.

Windows 7 Webengine example fail with "Unknown module(s) in QT: webengine"

Unsolved Using default flash - no dynamic loaded (Actionscript 3) content shown in flash mask

$
0
0

Hello,

I try to load a flash swf file, which dynamically loads content from the same folder location as the swf is in.
In my flash settings and webkit the content was just showing fine, even so the flash securtity setup required to set the folder trustet.

In Webengine the flash content loads, but it seems that actionscript is not executed, I just get the background picture.

I use the following QWebEngineSettings:

QWebEngineSettings *defaultSettings = QWebEngineSettings::globalSettings();

    defaultSettings->setAttribute(QWebEngineSettings::PluginsEnabled, true);
    defaultSettings->setAttribute(QWebEngineSettings::ErrorPageEnabled, true);
    defaultSettings->setAttribute(QWebEngineSettings::JavascriptCanOpenWindows, false);
    defaultSettings->setAttribute(QWebEngineSettings::JavascriptCanAccessClipboard, false);
    defaultSettings->setAttribute(QWebEngineSettings::JavascriptEnabled, true);
    defaultSettings->setAttribute(QWebEngineSettings::LocalContentCanAccessFileUrls, true);
    defaultSettings->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, true);
    defaultSettings->setAttribute(QWebEngineSettings::LocalStorageEnabled, false);
    defaultSettings->setAttribute(QWebEngineSettings::AutoLoadImages, true);
    defaultSettings->setAttribute(QWebEngineSettings::AutoLoadIconsForPage, false);
    defaultSettings->setAttribute(QWebEngineSettings::TouchIconsEnabled, false);
    defaultSettings->setAttribute(QWebEngineSettings::FullScreenSupportEnabled, false);```

Am I missing out on anything?

And also a question, is Actionscript 3 ExternalInterface javascript features available in QWebengine?
I tried to get it running in an older codebase using QWebkit, but besides the content showing, evalutateJavascript didnt trigger it.

So I tried to get it working with QWebEngine to see if things improved.

Any help would be appreciated.

PS: I tried to install and use pepperflash - but it didnt work for me using the command line options:
--ppapi-flash-version=24_0_0_189
--ppapi-flash-path=path_to_dll/sub_path/pepflashplayer32_24_0_0_189.dll

It says the plugin is not enable if I use that as command line arguments.

Viewing all 13965 articles
Browse latest View live


Latest Images