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

Unsolved Signal for when a DOM resource finishes downloading?

$
0
0

I have a website that loads DOM resources such as images, iframes, ajax, scripts, etc.

Running qt web engine on this website, I found a way for the render to time the exact moment these requests were initiated by subclassing QWebEngineUrlRequestInterceptor, and passing that class to m_page.profile()->setRequestInterceptor().

However, I would also like to time when these DOM resources finish downloading as well. This was possible in qt webkit, so I was hoping there's a way to do it for qt webengine.

One example I thought was the solution is the signal QWebEngineProfile::downloadRequested(QWebEngineDownloadItem *download). This signal allows me to access the QWebEngineDownloadItem object, which signals when the download has finished, which is basically what I am looking for. However, this signal doesn't ever seem to be executed. I think it is only run when e.g. the application user clicks on a download link, rather than being run for every DOM resource being downloaded.

Is there a way I can figure out when a DOM resource finishes downloading? I spent basically the entire day looking through documentations, but couldn't find anything. Any help would be appreciated!


Sub-frames access

$
0
0

@knt261 Thank you very much! This permits access to the contents of the iframe from javascript

Unsolved In 5.5.1 FancyBrowser (WebEngine-based) is crashed at the exit

Unsolved How work with QWebEngineUrlRequestJob?

$
0
0

I have inherited from QWebEngineUrlSchemeHandler. Redefined method requestStarted(QWebEngineUrlRequestJob *request)
After I try to call QWebEngineUrlRequestJob::reply
for example

void CustomUrlSchemeHandler::requestStarted(QWebEngineUrlRequestJob *request)
{
qDebug() << "CustomUrlSchemeHandler::requestStarted -->>> " << request->requestUrl();

QMimeDatabase HelpViewer;
QMimeType mt = HelpViewer.mimeTypeForUrl(request->requestUrl());
const QString mimeType = mt.name();
QByteArray arr = QString::fromStdString("<html><body>Hello world</body></html>").toUtf8();
QBuffer *buffer = new QBuffer(&arr, this);
buffer->open(QIODevice::ReadOnly);
request->reply(mimeType.toLatin1(), buffer);

return;

}
But the program crashes.
pls see more detail - http://stackoverflow.com/questions/33933958/qt-5-6-beta-qtwebengine-how-work-with-qwebengineurlrequestjob

Unsolved "Not allowed to load local resource" for iframe, how to disable web security ?!

$
0
0

@knt261

You can pass the "--disable-web-security" argument to the QApplication object in your main.cpp.

Hi – Can you show the code to do that (I'm new at this).

thanks!

Unsolved Building QtWebEngine: invalid directive: '%param'

$
0
0

Trying to build QtWebEngine from current sources(followed this instructions https://wiki.qt.io/QtWebEngine_on_Windows), faced with problem where compilation breaks with this error message:

(set PATH=F:/webengine/qt5/gnuwin32/bin;%PATH:)=^)%) & win_bison --no-lines --skeleton=yacc.c --defines=glslang_tab.h --output=glslang_tab.cpp ..\..\..\3rdparty\angle\src\compiler\translator\glslang.y
..\\..\\..\\3rdparty\\angle\\src\\compiler\\translator\\glslang.y:48.1-6: error: invalid directive: '%param'
..\\..\\..\\3rdparty\\angle\\src\\compiler\\translator\\glslang.y:48.10-24: error: syntax error, unexpected {...}
NMAKE : fatal error U1077: '(set' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\nmake.EXE"' : return code '0x2'
Tried to google it, with no luck. Please help!

Unsolved Passing/Changing Arguments to QtWebengineProcess

Unsolved Static builds of QtWebEngine aren't supported.

$
0
0

Hi and welcome to devnet,

As stated by the error message, the static builds of QtWebEngine are not supported.


Unsolved [Question] Crash if Url is incomplete

$
0
0

Good Evening Forum.
I have the following strange Problem:

When the Url contains only Strings like ftp:/, ftp://, http:/, http:// etc, the whole Application crashes. I wrote an very simple if else Checkpoint:

if(errorTestString.endsWith("ftp:/", Qt::CaseInsensitive) || errorTestString.endsWith("ftp://", Qt::CaseInsensitive)
|| errorTestString.endsWith("ftps:/", Qt::CaseInsensitive) || errorTestString.endsWith("ftps://", Qt::CaseInsensitive)
|| errorTestString.endsWith("http:/", Qt::CaseInsensitive) || errorTestString.endsWith("http://", Qt::CaseInsensitive)
|| errorTestString.endsWith("https:/", Qt::CaseInsensitive) || errorTestString.endsWith("https://", Qt::CaseInsensitive))
{
    //    QWebEnginePage::WebAction stopOnError;
    //stopOnError = QWebEnginePage::Stop;
    m_BrowserModule->triggerPageAction(QWebEnginePage::Stop, true);
  //m_BrowserModule->triggerPageAction(QWebEnginePage::Stop);

    QMessageBox::critical(this, "Invalid Url", "Please check Url");
     // m_BrowserModule->triggerPageAction(stopOnError);
     //m_BrowserModule->load(QUrl("www.google.de"));
    }
else if(!errorTestString.endsWith("ftp:/", Qt::CaseInsensitive) || !errorTestString.endsWith("ftp://", Qt::CaseInsensitive) || !errorTestString.endsWith("ftps:/", Qt::CaseInsensitive) || !errorTestString.endsWith("ftps://", Qt::CaseInsensitive)
|| !errorTestString.endsWith("http:/", Qt::CaseInsensitive) || !errorTestString.endsWith("http://", Qt::CaseInsensitive)
|| !errorTestString.endsWith("https:/", Qt::CaseInsensitive) || !errorTestString.endsWith("https://", Qt::CaseInsensitive))
{
 m_BrowserModule->load(loadEnteredUrl);
}

The Error Message in Debug Mode is:

[1209/200048:FATAL:gurl.cc(177)] Check failed: false. Trying to get the spec of an invalid URL!
Backtrace:
    QtWebEngineCore::FilePickerController::mode [0x0000000182639A06+178262]
    QtWebEngineCore::BrowserContextAdapter::httpCacheMaxSize [0x000000018253843D+6359197]
    QtWebEngineCore::URLRequestCustomJobDelegate::qt_static_metacall [0x0000000181D4084B+4492763]
    QtWebEngineCore::BrowserContextAdapter::customUrlSchemeHandlers [0x0000000180A6D029+4996313]
    QtWebEngineCore::BrowserContextAdapter::customUrlSchemeHandlers [0x0000000180A6DA9D+4998989]
    QtWebEngineCore::BrowserContextAdapter::customUrlSchemeHandlers [0x0000000180980E31+4029153]
    QtWebEngineCore::BrowserContextAdapter::customUrlSchemeHandlers [0x0000000180980A70+4028192]
    QtWebEngineCore::BrowserContextAdapter::customUrlSchemeHandlers [0x000000018097F75D+4023309]
    QtWebEngineCore::BrowserContextAdapter::customUrlSchemeHandlers [0x00000001809806B0+4027232]
    QtWebEngineCore::WebContentsAdapter::load [0x0000000180225A28+280]
    QWebEngineHistory::backItem [0x00007FF8491FD3CC+43449]
    QWebEngineHistory::backItem [0x00007FF849212765+130386]
    CBrowser::changeLocation [0x00007FF7E7E3B2C6+614] (c:\meineprogramme\gitprojects\aktool\cbrowser.cpp:65)
    CBrowser::qt_static_metacall [0x00007FF7E7E6D4CE+142] (c:\meineprogramme\gitprojects\build-aktool-5_6_git_debug-debug\debug\moc_cbrowser.cpp:122)
    QCoreApplicationPrivate::cleanupThreadData [0x000000005670BB12+4781628]
    QCoreApplicationPrivate::cleanupThreadData [0x000000005670B298+4779458]
    QSplashScreen::mousePressEvent [0x00000000572FA984+2850080]
    QSplashScreen::mousePressEvent [0x00000000572F6803+2833311]
    QCoreApplicationPrivate::cleanupThreadData [0x000000005670BB12+4781628]
    QCoreApplicationPrivate::cleanupThreadData [0x000000005670B298+4779458]
    QSplashScreen::mousePressEvent [0x000000005772B3A4+7243584]
    QSplashScreen::mousePressEvent [0x00000000573EC026+3838914]
    QSplashScreen::mousePressEvent [0x00000000572FB243+2852319]
    QSplashScreen::mousePressEvent [0x00000000570EF4E4+706688]
    QSplashScreen::mousePressEvent [0x00000000572FD20A+2860454]
    QSplashScreen::mousePressEvent [0x0000000057084C9E+270394]
    QSplashScreen::mousePressEvent [0x000000005707FB0B+249511]
    QCoreApplicationPrivate::cleanupThreadData [0x00000000566B8D46+4442224]
    QCoreApplicationPrivate::cleanupThreadData [0x0000000056818C6B+5883797]
    QSplashScreen::mousePressEvent [0x0000000057136092+996398]
    QSplashScreen::mousePressEvent [0x00000000571358C2+994398]
    QSplashScreen::mousePressEvent [0x0000000057084C9E+270394]
    QSplashScreen::mousePressEvent [0x000000005707F9B3+249167]
    QCoreApplicationPrivate::cleanupThreadData [0x00000000566B8D46+4442224]
    QCoreApplicationPrivate::cleanupThreadData [0x0000000056818C6B+5883797]
    QPlatformThemePrivate::initializeSystemPalette [0x00007FF8377594A2+548365]
    QPlatformThemePrivate::initializeSystemPalette [0x00007FF83775B9C7+557874]
    QPlatformThemePrivate::initializeSystemPalette [0x00007FF8377178D5+279104]
    QTextDocumentPrivate::q_func [0x00007FF83745D022+356351]
    QCoreApplicationPrivate::cleanupThreadData [0x000000005676D6D4+5181950]
    DispatchMessageW [0x00007FF85C521169+1673]
    DispatchMessageW [0x00007FF85C520C97+439]
    QCoreApplicationPrivate::cleanupThreadData [0x000000005676E1F5+5184799]
    QTextDocumentPrivate::q_func [0x00007FF83745CEF9+356054]
    QCoreApplicationPrivate::cleanupThreadData [0x00000000566B3958+4420738]
    QCoreApplicationPrivate::cleanupThreadData [0x00000000566B3B9E+4421320]
    QCoreApplicationPrivate::cleanupThreadData [0x00000000566B6ABF+4433385]
    QPlatformThemePrivate::initializeSystemPalette [0x00007FF837757128+539283]
    QSplashScreen::mousePressEvent [0x000000005707F4BA+247894]
    main [0x00007FF7E7E334DE+126] (c:\meineprogramme\gitprojects\aktool\main.cpp:17)
    invoke_main [0x00007FF7E7E72124+52] (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:75)
    __scrt_common_main_seh [0x00007FF7E7E71FBE+302] (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264)
    __scrt_common_main [0x00007FF7E7E71E7E+14] (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:309)
    mainCRTStartup [0x00007FF7E7E72149+9] (f:\dd\vctools\crt\vcstartup\src\startup\exe_main.cpp:17)
    BaseThreadInitThunk [0x00007FF85C2A8102+34]
    RtlUserThreadStart [0x00007FF85E7FC2E4+52]

The program has unexpectedly finished.

The Error Message in Release Mode is:

[1209/200239:FATAL:navigation_controller_impl.cc(927)] Check failed: active_entry->site_instance() == rfh->GetSiteInstance(). 
The program has unexpectedly finished.

I know, it is unlikely that someone types only i.e. ftp:// but I know that I sometimes accidently hit the Enter Button. So it should not crash the whole Application. That is complete BS. If it is only a String like 'abc', you get the normal ERR_NAME_NOT_RESOLVED Page.

The Problem is, that calling the Stop Trigger to Stop loading the Page/Url, is already too late. The if else Checkpoint gets hit, but the Application crashes after that.
Thanks!

Unsolved How to cross compile qtwebengine in embedded machine (linux arm) ?

$
0
0

Are you sure you have the libraries built in the webengine sub-folder

Unsolved Cant Run Application Created With QT5 And VS2013 In Windows XP

$
0
0

Qt's precompiled package is compiled with v120 toolset not v120_xp, so you have to compile qt by yourself and configure with "-target xp"

Unsolved QtWebEngine on git 5.6 branch build failed on Windows 7 whit MSVC2013

$
0
0

I cloned the qt 5.6 source from git, when I build qt, everything was ok except qtwebengine module.
It failed with "NMAKE: fatal error U1073: don't know how to make "D:/Qt5/qt5/qtwebengine/src/core/Debug/obj\src\core\QtWebEngineCore.access_token_store_qt.obj"

It seems like access_token_store_qt.cpp didn't get compiled. Is anyone know how to build qtwebengine?

Solved How to build 32 bit QtWebEngine on Mac

$
0
0

Hi and welcome to devnet,

AFAIK from the Chromium project, builds for 32bit Macs have ended by the end of 2014.

Snow Leopard was the last version supporting 32 Bit processors.

Unsolved How to set a viewport with QtWebEngine?

$
0
0

I have created a application with a QWebEngineView widget with a width of 500px. However when viewing websites like google.com the website is not recognizing the fact that it is a small windows and still displaying the full site.

Because of this you can only see the top corner of the webpage. I am assuming this is because QWebEngineView is not setting a viewport. This used to be possible in QWebKit, is there any work around for QWebEngine?

Unsolved Stepping into QtWebEngineCore

$
0
0

Hi, I'm trying to step into QtWebEngineCore (Qt 5.6) but I can't.It just steps over the function. Has any one encountered this? I looked at the modules window in visualstudio and it looks like the symbols for QtWebEngineCore.dll is being loaded and its loading the symbol file I expect. However the behavior is acting like there are no symbols.

All the other webengine modules I can step in and debug.

Any thoughts would be appreciated.

Thanks
Bryan


QtWebEngine Flash (pepper) plugin

Unsolved Webengine - open in external browser

$
0
0

Correct, you add the acceptNavigationRequest() to your QWebEnginePage derived class, then supply the guts for the function to open the user's default browser.
E.g.:

class MyWebPage : public QWebEnginePage { Q_OBJECT public: MyWebPage(QObject* parent = 0) : QWebEnginePage(parent){} bool acceptNavigationRequest(const QUrl & url, QWebEnginePage::NavigationType type, bool isMainFrame) { qDebug() << "acceptNavigationRequest("<<url << "," << type << "," << isMainFrame<<")"; if (type == QWebEnginePage::NavigationTypeLinkClicked) { QDesktopServices::openUrl(url); return false; } return true; } }

Unsolved Building qtwebengine is error about python

$
0
0

Hi all,

I have a question, I use the imx6 toolchain cross compile qtwebengine(qt5.4).
But , I have some error.

Error log:
/*****************************/
opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin//arm-fsl-linux-gnueabi-g++"...
using python: /usr/bin/python version: 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2]
Using extra options found in /mnt/raid/peter/Freescale/FSL_LTIB_3.0.35_QT_5.4/Qt_5.4/qt-everywhere-opensource-src-5.4.0/qtwebengine/src/core/qmake_extras.gypi
Using extra options found in /mnt/raid/peter/Freescale/FSL_LTIB_3.0.35_QT_5.4/Qt_5.4/qt-everywhere-opensource-src-5.4.0/qtwebengine/src/core/qtwebengine_extras.gypi
Updating projects from gyp files...
Exception: unexpected indent (qmake_extras.gypi, line 26)
Traceback (most recent call last):
File "/mnt/raid/peter/Freescale/FSL_LTIB_3.0.35_QT_5.4/Qt_5.4/qt-everywhere-opensource-src-5.4.0/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 484, in CallLoadTargetBuildFile
includes, depth, check, False)
File "/mnt/raid/peter/Freescale/FSL_LTIB_3.0.35_QT_5.4/Qt_5.4/qt-everywhere-opensource-src-5.4.0/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 373, in LoadTargetBuildFile
includes, True, check)
File "/mnt/raid/peter/Freescale/FSL_LTIB_3.0.35_QT_5.4/Qt_5.4/qt-everywhere-opensource-src-5.4.0/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 253, in LoadOneBuildFile
aux_data, includes, check)
File "/mnt/raid/peter/Freescale/FSL_LTIB_3.0.35_QT_5.4/Qt_5.4/qt-everywhere-opensource-src-5.4.0/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 290, in LoadBuildFileIncludesIntoDict
LoadOneBuildFile(include, data, aux_data, None, False, check),
File "/mnt/raid/peter/Freescale/FSL_LTIB_3.0.35_QT_5.4/Qt_5.4/qt-everywhere-opensource-src-5.4.0/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 233, in LoadOneBuildFile
None)
File "<string>", line 26
['CC', '/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-gcc'],
^
IndentationError: unexpected indent while reading includes of /mnt/raid/peter/Freescale/FSL_LTIB_3.0.35_QT_5.4/Qt_5.4/qt-everywhere-opensource-src-5.4.0/qtwebengine/src/core/core.gyp

Project ERROR: -- running gyp_qtwebengine failed --
make[3]: *** [Makefile.gyp_run] Error 3
make[3]: Leaving directory /mnt/raid/peter/Freescale/FSL_LTIB_3.0.35_QT_5.4/Qt_5.4/qt-everywhere-opensource-src-5.4.0/qtwebengine/src/core' make[2]: *** [sub-gyp_run-pro-make_first] Error 2 make[2]: Leaving directory/mnt/raid/peter/Freescale/FSL_LTIB_3.0.35_QT_5.4/Qt_5.4/qt-everywhere-opensource-src-5.4.0/qtwebengine/src/core'
make[1]: *** [sub-core-make_first] Error 2
make[1]: Leaving directory `/mnt/raid/peter/Freescale/FSL_LTIB_3.0.35_QT_5.4/Qt_5.4/qt-everywhere-opensource-src-5.4.0/qtwebengine/src'
make: *** [sub-src-make_first] Error 2
/*****************************/

I think the error about python syntax. But I don't know about python language.

Is the error have any patch to fix it ?
If you know the answer. Please help me, thx.

Unsolved How to build QtWebEngine for android

Qt 5.6 QtWebEngine crashes on launch in Xcode on OSX 10.11

$
0
0

Hi and welcome to devnet,

To enable Secure Transport just add -securetransportto your configure line.

What exactly was problematic when build your own Qt ?

Viewing all 13965 articles
Browse latest View live


Latest Images