QT 5.4 WebEngine dev tools for javascript - qt

I'm creating an application using QWebEngineView and QWebEnginePage.
I was wondering if there is a way to active the Web Dev Tools?
I need to debug the html, javascript code like you do it using Google Developer Tool on Chrome.
If it is not possible in QT 5.4 does anyone know when it is planned to be included in future versions of QT ?

add these line to your code
#ifdef QT_DEBUG
qputenv("QTWEBENGINE_REMOTE_DEBUGGING", "9000");
#endif
after launching your application start google chrome then navigate to http://localhost:9000 you will get developer tools

You can do it with older QWebView, see QWebSettings::DeveloperExtrasEnabled.
Docs have nothing about same for QWebEngineView, but I found this link (look at line 47). I didn't try if it works, but you can try. May be dev tools will be available in one of the following QT versions.

And here is a bit more flexible solution: to launch application with command line parameter --remote-debugging-port=XXXX. It's automatically routed by QApplication to the Blink (or whatever QWebEngine is) internals, so there is no additional work like arguments parsing needed; and it can be changed without app rebuild.
Upd: frankly speaking, I had used it only with 5.5 & 5.6, perhaps it unsupported in 5.4

set command line "remote-debugging-port=XXXX";but there's a problem, when the application exit, it will produce a crash

Related

Qt error with reMarkable tablet app

I have a reMarkable tablet , which I mostly love except for the lack of linux support (surprising given it is a linux-based OS). However, I've managed to find a version of a linux application that is now unofficial. This github is actually a Qt docker app, but if you look in the code for the 'Dockerfile' you can find where to download the app, which is apparently still on the server even though there's not a link from the main web page. Anyway, I downloaded it and got it mostly working, figuring out a few dependencies based on same Dockerfile code. But, I can't seem to get file dialogs to work, which is the main reason for using the app.
The error I get is:
ERROR: No native FileDialog implementation available.
Qt Labs Platform requires Qt Widgets on this setup.
Add 'QT += widgets' to .pro and create QApplication in main().
I'm not a Qt developer, so I'm lost. I'd love to get this to work. Thanks.
In the .pro file of you project you should add this line QT += widgets
or just add widgets to the line with QT += ...
Qt can use native file dialogs on some platforms, and will fall back to its own implementation if none is available. But that requires that the application is built including the QtWidgets module, and using a QApplication.
If you don't have the source code of the app and a possiblity to rebuild it, there's no chance to fix this from a binary

Google NaCl with Qt on Windows

I have a project which is using Qt 4.7.4 version (also I can't rebuild it using qt4.8 or qt5 – there are a lot of errors appears, project is big and not mine so fixing issues would be even harder than erasing the whole code and write new code). So I need to make this project, well, working on NativeClient.
Is it even possible? I use Windows and Visual Studio, I was trying to google instructions about qt+nacl on Windows but just can’t find nothing.
Also which pepper version should I use if it depends on it?
Is your qt build supporting native client?
Please check out this
Windows
The Qt-Nacl is not support, for now, in Windows.
By the way, here is the github repository dedicated for it -> https://github.com/msorvig/qt5-qtbase-nacl
In the file nacl-readme it is written :
[...] Windows is not supported as a host platform.
Linux
If you want to compile in Linux, I have made a script that will compile Qt5.4 with NaCl with all the dependencies needed.
https://gist.github.com/theshadowx/438297ac465874a5e226
I also made a video that will show the different steps and a showCase at the end :
https://www.youtube.com/watch?v=q2pMv1Svtqw

Qt build for Wince works, but no plugins or import work

I've got Qt build for a CE 6 custom sdk. I can use VS2005 and a KITL connection and run several of the Qt examples successfully on the device. I can also run examples if I copy all of the Qt dll's into a directory with the .exe on a USB drive and attach it to the device.
However, it seems that anything that uses QTDIR to find the location doesn't work (plugins and QML imports). I was able to get some QML examples to work if I included the qml in the project as a resource file.
Nothing I've tried works (including copying the plugins/imports to a directory with the dlls). I can't set QTDIR, as wince doesn't have environment settings.
I was able to get a little further with a static build vs. shared, but I believe that "nice stuff" like QtWebkit and QtMobility won't be available for static builds.
Is there some secret to deployment on wince that I'm missing?
Tracked it down. In src/corelib/io/qfilesystemiterator_win.cpp there is a code chunk:
if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) {
dwAdditionalFlags = 2; // FIND_FIRST_EX_LARGE_FETCH
infoLevel = 1 ; // FindExInfoBasic;
}
The enums for windowsVersion for wince (6.0) are different, causing this to trigger as true instead of false. Wrapping the above code in
#ifndef Q_OS_WINCE
...
#endif
fixes the problem.
Note, I found a git repo for Windows Embedded Compact 7 patches that (as of 4.8.0) is not included in Qt. This fix is one of the changes. Check out https://qt.gitorious.org/qt/jaanttils-qt/graph/WEC7_Patches if you are working on 4.8 and wince (even CE 6). I needed a handful of changes on top, but I think they were specific to the sdk I'm using.

How to debug in AS3 only project in Flex...?

I am trying to build a AS3 only project in Flex....I have tried debug mode, but seems like it takes so long to compile....I can't use trace or check variables...Are there anyway to do debug?? Thanks for the help..
Which version of Flash Player have you installed, you need the debugger version. Check your browser , some browsers like Chrome for instance , come with Flash Player bundled in , but this isn't the version you need. You can also check your application properties, particularly the Run/Debug Settings.
Last but not least, you could also watch this Lee Brimelow tutorial, about using MonsterDebugger
http://gotoandlearn.com/play.php?id=109

Could not open the editor: Assertion failed:

when i open .mxml flex file in eclipse it gives error
Could not open the editor: Assertion failed:
Does any one know about it
First of all you can give which operating System and version, IDE version, Flex plugin version, detail of error message. You can try ;
Check eclipse and flex plugin version compatibility if you use flex plugin. (If you use Linux operating system flex plugin compatible with eclipse 3.3 ide if not You can try to install flex plugin on eclipse 3.3 if you use 3.4 or 3.5 and so on)
You can download full package of flex ide instead of flex plugin on eclipse
I think its better to stop searching when you are in Flash and Linux. Here in this link its very much transparent. I tried all the fix provided out there, nothing did really worked what new comers are looking for.
Details: http://labs.adobe.com/technologies/flex/flexbuilder_linux/releasenotes.html#sysreq
Note: GUI will never work, which we are thinking and Autocomplete etc will also not work. So Flash and Linux is actually useless and time lose. The best thing is keep reporting Adobe for this. Because they are counting our Linux Vote.
Try changing your current workspace to another one, it helped in my case.
If you have disabled asking for workspace at startup you can change it here:
Window > Preferences > General > Startup and Shutdown
I just got the same error, after moving my project to a new computer. Turns out the build paths needed to be changed in the new computer. After updating those it seemed to fix the problem.
I struggled with this a couple of hours: my own "solution" to this was that I had Eclipse Galilieo / Weblogic 10.3.2 / Windows 7 set up correctly, but was accidently opening an old Eclipse Helios install pointed to the same projects. In other words yes, its likely a slight path difference or a new name for an updated resource along one of your paths. "assertion failed" is such a generic exception that you could get with so many different softwares, that I thought this input wouldnt hurt...

Resources