How to debug/step into QT SDK sources from my project - qt

I want to debug, set break points etc in QT SDK sources,
I have QT5.5.0 built with symbols and symbols are picked up, at lest GDB says so.
But I still cannot debug into for Example QGuiApplication, well I don't really care about QGuiApplication but I want to be able to set break point anywhere in QT Sources and stop there when my code get there.
I do have QT 5.5.0 project opened alongside with my project, but setting break point in QT5.5.0 does not have any effect, also stepping into any QT SDK code simply does nothing, it just stays where it was stopped by breakpoint in my project.
So question is how can I place breakpoints in QT SDK code anywhere I want and when I debug my project I will be able to stop in QT code. And how can I step into QT SDK code.
Ubuntu 14.04, QT 5.5.0, Creator 3.6.0, QNX ( ARM platform ) but it is irrelevant.

Don't install any QT binary (qtcore/qtgui),
build from source and
intall them with debug symbols, should be around 200~300M each library.
Make sure your example code is loading the debug version of qt files.

Related

Cannot step into Qt source

I create a Qt project,build the project with msvc2017-32bit kit, and debug the project in Qt Creator. The problem is I can not step into the Qt functions. I can stop at break-points in my own source code, but cannot stop at break-points in files in Qt src directory. When I step into a Qt function, a message Stopped: "end-stepping-range" appears by the debugging buttons. Why could this happen?
According to #user13088490's suggestion, I installed the debugger tools for windows in windows 10 SDK, but the problem persists.
Follow the instructions from Qt here.
For Mac, the instructions are:
In Projects->Build&Run->Run->Run Settings->Run, select "Use debug version of frameworks".
There are different instructions for Windows, but I have not tried it yet.
You probably also need to have QT sources installed.
Go to the MaintenanceTool and check if Qt Creator 4.15.2 CDB Debugger Support and Debugging Tools for Windows has been selected.
I run Qt on Windows, although a different compiler than you, and you can set the debug target paths by going to Tools->Options->Debugger. From here you can click a button Add Qt sources.... Below is an image of my setup and this works for me.

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

How do I make QtCreator 4.2.2 include webkit related files

I've pretty much tried every proposal on solving this question that's on the entire internet but to no avail.
I'm using Qtcreator 4.2.2 on Windows 10, trying to make a program that must use a webview (of any kind) -- so far, I've tried using the QWebView and QWebKit stuff but it consistently refuses to recognise that I have the modules installed. I've verified that the dll, header and .pri files do exist in the system. I've tried using the MSVC and MinGw compilers, all with the same result; if I add web* to the QT variable in the project file, qmake claims the modules do not exist. None of the web stuff appears in the UI designer; neither for regular forms nor for qml.
How do I fix this? Is there some magic stuff that I have to do, that's not documented anywhere or am I just blind?
Edit: I've successfully created a program using QtCreator packaged in Fedora 26, that uses QWebView.
It has nothing to do with Qt Creator, it just depends on which Qt version you have.
First Qt WebKit is not distributed since Qt 5.6, it has been replaced by Qt WebEngine.
Qt WebEngine does not support MinGW, so you are required to use MSVC. (Looking at my Qt installation it seems it is also the case for WebView)
See: http://doc.qt.io/qt-5/qtwebengine-platform-notes.html#windows
Finally, Qt WebEngine is displayed as an optional module in the Qt Maintenance Tool, so you need to explicitly select it.

Qt Creator crashes loading Examples

There is an Example tab at the Qt Creator(2.6.1)'s Welcome page, which is supposed to show the already made Qt Project Examples. But whenever I click on that, Qt creator closes automatically. Sometimes it shows the Example projects for 1 or 2 seconds and the exits. Any idea?
You probably need to configure Qt Creator to find your Qt installation.
Compiler configuration for Qt Creator
And you might need to get the msvs compiler, too.
http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products
They now have the mingw version available for windows with Qt 5.0.2.
http://qt-project.org/downloads
Also if you installed Qt without the examples that may also cause this error.
Hope that helps.

Debugging a version of Qt Creator and plugins all built from source

My goal is to be working on / debugging qt creator plugins and, maybe, editing / debugging qt creator source code. Towards this end I've tried a couple of things:
Downloading source for the qt sdk and qt creator, compiling each, and then making a qt creator plugin project and hooking everything together by hand. This got complicated pretty quickly (I tried to keep my plugin project outside the qt-creator/src/plugin/ folder) and doesn't really get me to a nice spot in terms of debugging.
Using an installed version of the qt creator to open the qtcreator.pro that came along with the source, adding a qt creator plugin as a sub project, and building everything from the already installed version of qt creator.
I like the second approach a lot because I have control over everything but I can rely on qt creators tools that make projects, enhance debugging, etc. There's just one small problem...
When I run my shiny new build of qt creator (with my plugin project) from inside the installed version all I get is a popup called "qtcreator_process_stub" that says "This is an internal helper of Qt Creator. Do not run it manually. Press to close this window..."
So I'm not really sure how to debug my build of qt creator from my instance of qt creator. Any ideas? Note: if I run the generated Qt Creator.app I get a functioning instance of qt creator with my plugin loaded properly.
I believe this was a versioning problem. I had an older version of the ide installed and was using it to build and debug a newer version of the ide.
I was able, in the older ide, to launch and debug the new ide as an external process through the debug menu... but that was mildly annoying.
Once I installed a new version of the ide I was able to debug like normal.

Resources