QWebView does not display the map
-
Hi!
I'm trying to open the map in QWebView , but when you start the program crashes. Please tell me how to fix it.import QtQuick 2.12 import QtQml 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.12 import QtWebView 1.13 Item { width: 400 height: 650 visible: true WebView { anchors.fill: parent url: "https://m.yandex.ru/maps" } }
-
Hi,
What Qt version ?
What OS ?
Run it through the debugger and show the stack trace. -
Qt 5.13
OS: Windows 7 64 bit pro and Android 6
And you have this code normally opens map?
Debuger get this:Qt5WebEngineCored!base::debug::BreakDebugger [c:\users\qt\work\qt\qtwebengine\src\3rdparty\chromium\base\debug\debugger_win.cc @ 20]: 0x7fedb802a10 sub rsp,28h 0x7fedb802a14 <+ 4> call Qt5WebEngineCored!base::debug::IsDebugUISuppressed (000007fe`db7ddd50) 0x7fedb802a19 <+ 9> movzx eax,al 0x7fedb802a1c <+ 12> test eax,eax 0x7fedb802a1e <+ 14> je Qt5WebEngineCored!base::debug::BreakDebugger+0x1b (000007fe`db802a2b) 0x7fedb802a20 <+ 16> mov ecx,1 0x7fedb802a25 <+ 21> call qword ptr [Qt5WebEngineCored!_imp__exit (000007fe`e01e8d00)] 0x7fedb802a2b <+ 27> int 3 0x7fedb802a2c <+ 28> add rsp,28h 0x7fedb802a30 <+ 32> ret 0x7fedb802a31 <+ 33> int 3 0x7fedb802a32 <+ 34> int 3 0x7fedb802a33 <+ 35> int 3 0x7fedb802a34 <+ 36> int 3 0x7fedb802a35 <+ 37> int 3 0x7fedb802a36 <+ 38> int 3 0x7fedb802a37 <+ 39> int 3 0x7fedb802a38 <+ 40> int 3 0x7fedb802a39 <+ 41> int 3 0x7fedb802a3a <+ 42> int 3 0x7fedb802a3b <+ 43> int 3 0x7fedb802a3c <+ 44> int 3 0x7fedb802a3d <+ 45> int 3 0x7fedb802a3e <+ 46> int 3 0x7fedb802a3f <+ 47> int 3 Qt5WebEngineCored!std::pair<base::BasicStringPiece<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,base::debug::ActivityUserData::ValueInfo>::pair<base::BasicStringPiece<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,base::debug::ActivityUserData::ValueInfo><base::BasicStringPiece<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > &,base::debug::ActivityUserData::ValueInfo,0> [c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.15.26726\include\utility @ 174]: 0x7fedb802a40 mov qword ptr [rsp+18h],r8 0x7fedb802a45 <+ 5> mov qword ptr [rsp+10h],rdx 0x7fedb802a4a <+ 10> mov qword ptr [rsp+8],rcx 0x7fedb802a4f <+ 15> push rsi 0x7fedb802a50 <+ 16> push rdi 0x7fedb802a51 <+ 17> sub rsp,28h 0x7fedb802a55 <+ 21> mov rcx,qword ptr [rsp+48h] 0x7fedb802a5a <+ 26> call Qt5WebEngineCored!std::forward<content::AccessibilityTreeFormatter * &> (000007fe`d7160e90) 0x7fedb802a5f <+ 31> mov rdi,qword ptr [rsp+40h] 0x7fedb802a64 <+ 36> mov rsi,rax 0x7fedb802a67 <+ 39> mov ecx,10h 0x7fedb802a6c <+ 44> rep movs byte ptr [rdi],byte ptr [rsi] 0x7fedb802a6e <+ 46> mov rcx,qword ptr [rsp+50h] 0x7fedb802a73 <+ 51> call Qt5WebEngineCored!std::forward<content::AccessibilityTreeFormatter * &> (000007fe`d7160e90) 0x7fedb802a78 <+ 56> mov rcx,qword ptr [rsp+40h] 0x7fedb802a7d <+ 61> add rcx,10h 0x7fedb802a81 <+ 65> mov rdx,rax 0x7fedb802a84 <+ 68> call Qt5WebEngineCored!base::debug::ActivityUserData::ValueInfo::ValueInfo (000007fe`db8077d0) 0x7fedb802a89 <+ 73> mov rax,qword ptr [rsp+40h] 0x7fedb802a8e <+ 78> add rsp,28h 0x7fedb802a92 <+ 82> pop rdi 0x7fedb802a93 <+ 83> pop rsi 0x7fedb802a94 <+ 84> ret 0x7fedb802a95 <+ 85> int 3 0x7fedb802a96 <+ 86> int 3 0x7fedb802a97 <+ 87> int 3 0x7fedb802a98 <+ 88> int 3 0x7fedb802a99 <+ 89> int 3 0x7fedb802a9a <+ 90> int 3 0x7fedb802a9b <+ 91> int 3 0x7fedb802a9c <+ 92> int 3 0x7fedb802a9d <+ 93> int 3 0x7fedb802a9e <+ 94> int 3 0x7fedb802a9f <+ 95> int 3 Qt5WebEngineCored!std::pair<__int64,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::pair<__int64,std::basic_string<char,std::char_traits<char>,std::allocator<char> > ><__int64 const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,0> [c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.15.26726\include\utility @ 174]: 0x7fedb802aa0 mov qword ptr [rsp+18h],r8 0x7fedb802aa5 <+ 5> mov qword ptr [rsp+10h],rdx 0x7fedb802aaa <+ 10> mov qword ptr [rsp+8],rcx 0x7fedb802aaf <+ 15> sub rsp,28h 0x7fedb802ab3 <+ 19> mov rcx,qword ptr [rsp+38h] 0x7fedb802ab8 <+ 24> call Qt5WebEngineCored!std::forward<content::AccessibilityTreeFormatter * &> (000007fe`d7160e90) 0x7fedb802abd <+ 29> mov rcx,qword ptr [rsp+30h] 0x7fedb802ac2 <+ 34> mov rax,qword ptr [rax] 0x7fedb802ac5 <+ 37> mov qword ptr [rcx],rax 0x7fedb802ac8 <+ 40> mov rcx,qword ptr [rsp+40h] 0x7fedb802acd <+ 45> call Qt5WebEngineCored!std::forward<content::AccessibilityTreeFormatter * &> (000007fe`d7160e90) 0x7fedb802ad2 <+ 50> mov rcx,qword ptr [rsp+30h] 0x7fedb802ad7 <+ 55> add rcx,8 0x7fedb802adb <+ 59> mov rdx,rax 0x7fedb802ade <+ 62> call Qt5WebEngineCored!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> > (000007fe`d7171090) 0x7fedb802ae3 <+ 67> mov rax,qword ptr [rsp+30h] 0x7fedb802ae8 <+ 72> add rsp,28h 0x7fedb802aec <+ 76> ret 0x7fedb802aed <+ 77> int 3 0x7fedb802aee <+ 78> int 3 0x7fedb802aef <+ 79> int 3 Qt5WebEngineCored!base::internal::BindState<void (__cdecl base::debug::GlobalActivityTracker::*)(__int64,__int64,int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > &&),base::internal::UnretainedWrapper<base::debug::GlobalActivityTracker>,__int64,__int64,int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::BindState<void (__cdecl base::debug::GlobalActivityTracker::*)(__int64,__int64,int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > &&),base::internal::UnretainedWrapper<base::debug::GlobalActivityTracker>,__int64,__int64,int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > ><void (__cdecl base::debug::GlobalActivityTracker::*)(__int64,__int64,int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > &&),base::internal::UnretainedWrapper<base::debug::GlobalActivityTracker>,__int64 const &,__int64 &,int &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > [c:\users\qt\work\qt\qtwebengine\src\3rdparty\chromium\base\bind_internal.h @ 869]: 0x7fedb802af0 mov qword ptr [rsp+20h],r9 0x7fedb802af5 <+ 5> mov qword ptr [rsp+18h],r8 0x7fedb802afa <+ 10> mov byte ptr [rsp+10h],dl 0x7fedb802afe <+ 14> mov qword ptr [rsp+8],rcx 0x7fedb802b03 <+ 19> sub rsp,178h 0x7fedb802b0a <+ 26> mov dword ptr [rsp+30h],0 0x7fedb802b12 <+ 34> lea r8,[Qt5WebEngineCored!base::internal::BindState<void (__cdecl base::debug::GlobalActivityTracker::*)(__int64,__int64,int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > &&),base::internal::UnretainedWrapper<base::debug::GlobalActivityTracker>,__int64,__int64,int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::Destroy (000007fe`db809ce0)] 0x7fedb802b19 <+ 41> mov rdx,qword ptr [rsp+190h] 0x7fedb802b21 <+ 49> mov rcx,qword ptr [rsp+180h] 0x7fedb802b29 <+ 57> call Qt5WebEngineCored!base::internal::BindStateBase::BindStateBase (000007fe`db6f15d0) 0x7fedb802b2e <+ 62> mov rcx,qword ptr [rsp+198h]
-
@Mikeeeeee said in QWebView does not display the map:
Debuger get this
How about using a debug build instead of release?
-
@Mikeeeeee said in QWebView does not display the map:
And under Android does not compile. Why?
No idea, my crystal ball is broken.
What about giving more information, like errors you get? -
@Mikeeeeee said in QWebView does not display the map:
you need to stretch the window to the right, then the map will appear.
Faced almost the same issue on a Video Player project. Try to fix the resolution, and have a trial-error on the resolution variables :D