Qt Creator closed because of a problem with the "CppTools" plugin - qt

I made a wrong manoeuvre on Qt MaintenanceTool so I uninstalled QtCreator and installed it again, and now when I launch Qt a window appears on which it's written the following message:" Qt Creator closed because of a problem with the "CppTools" plugin,temporarily disable the plugin ?"
Then I can't open or create a c project anymore.
Would you have any suggestion ?

I created an issue here and with the advice I got I managed to solve it. It was a problem with my user settings. You can start QtCreator with "temporary clean settings":
open <path-to>/Qt/Qt\ Creator.app --args -tcs
If that works, clear your Qt user settings persistently:
mv ~/.config/QtProject ~/.config/QtProject.bak
Now you have a blank slate, and might have to reconfigure your projects etc.
Note that this is for macOS, the commands will differ for other platforms.

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 Creator won't open CMake C++ Project in OSX

I'm trying to work on an open-source project in Qt Creator on OSX. When I open the CMakeLists.txt like other CMake projects in Qt Creator it doesn't open the project. No folders, source files, not even the CMakeList.txt shows up in Qt Creator, just a completely blank project.
What could cause a project to do this?
Edit: the project opens properly in Ubuntu. It shows the CMakeLists.txt, source files, and everything. It even builds properly when I CMake in the command line on OSX. Qt Creator in OSX just does not open this project properly.
Eit 2: My build settings are completely empty too. There are no General Messages or messages of any kind.
Open your Preferences (Cmd+, on Mac) and go to the Build & Run and then CMake tab, do you see any CMake version listed there? For me, I have to add a manual entry because it doesn't automatically find my CMake. My manual entry is set to /Applications/CMake.app/Contents/bin/cmake so compare that with what you have in your settings.
Then restart Qt Creator and reopen your project. Go to Build & Run again and make sure the Kit you have selected for your project has a CMake Tool set (should be automatic if you have just the one CMake entry listed on the CMake tab).
Background Information
It looks like you are using Qt Creator 4.0. With that version, they changed a number of things related to how CMake projects are handled. When you first open a project, it won't create the build directory if it doesn't exist. Instead, it will run CMake in a temporary directory. This would be shown in the General Messages output pane if you had it open. Once you manually create the output directory as it appears in your project's Build Settings, Qt Creator will switch to running CMake in there instead. There's no indication this is happening apart from what is logged in the General Messages output pane, even if there's a problem with your CMakeLists.txt.
In your case, if there's genuinely nothing appearing in your General Messages output pane and CMake is working fine from the command line, that suggests something may be wrong with your Qt Creator settings.

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.

Qt Include and QMake error

Qt was messing up on Windows so I deleted it and re installed it with the qt libraries and Qt Creator. Now, whenever I try to open my old project, I get the error that "Qmake is does not exist or is not executable", and none of the Qt headers can be located.
Assuming you're using a recent version of Qt, such as version 4.7.4, and a recent version of Qt Creator, such as the branch 2.3 .*.
Probably somewhere in this process, Qt Creator or the settings for this specific project lost the reference to Qt install.
We first need to find out if Qt Creator knows where Qt is installed. Go to Tools > Options.... Then click in Qt4. Here will show all installed and detected Qt versions.
As you can see, I have one Qt version installed (4.7.4), which was automatically detected.
If you do not have any installed version, you need to indicate a one manually. Simply click Add and point it to the right qmake.exe. Use the paths of the figure as reference. If you are developing a windows/mingw application, just need to add the qmake.exe associated with mingw (c:\qtsdk\desktop\qt\4.7.4\mingw\bin\qmake.exe on my computer) and remember the Version name, we'll need that in next step.
After that, open the project and click on Projects in the lateral bar. You need to Substitute the Qt version. Click on Manage next to it and select the correct version. This should resolve the problem.
Any trouble just comment. Sorry about the creepy english.

"Design" button grayed out in Qt Creator for QML Project

I'm on a Kubuntu 11 system and trying out my first Qt Quick project. As this is Kubuntu I'm just running with the Qt that came with it, which has worked fine so far.
I asked Qt Creator to create the sample "Hello World" project from Qt Quick. But the design button was grayed out, as were the run buttons.
At first when I went into the Projects menu under "Run Settings" it said Qt version: [Invalid Qt Version]. Pushing the "Manage Qt versions" button brings up a tree control that looks like this:
v -- Auto-detected
| |
| +---Qt in PATH /usr/bin/qmake-qt4
|
+--- Manual
At the bottom of the dialog it says "Found Qt version 4.7.2, using mkspec linux-g++ (Desktop)"
I found out that I could get the "Invalid Qt version" message to go away by manually choosing to install QmlViewer from the app repositories. You'd think it would say something more like "Qml Viewer not found, please install it" but...oh well. Now it says Qt Version: [Qt in PATH].
So that's fixed, and the Qml app runs. But the "Design" button is still grayed out. Qt Designer is installed as an application, and its plugin shows in the "About Plugins..." list. The design button is enabled in ordinary (non-Qt-Quick) projects when I click on a form file, just not for .qml files.
in the QtCreator, go to Help -> About plugins -> Select "QT Quick".
Restart QtCreator and then select the ui.qml files. It should work now
In my case it wasn't showing up because I had my cpp file open. When I double clicked on the .ui file, the design button became active.
Solved it while writing the question.
To make a long story short: this appears to be a known issue in general with installing Qt Creator through the ubuntu repositories as opposed to using the Qt SDK Installer from Nokia:
http://qt.nokia.com/downloads
(That installer seems to do the work of making sure the proper SDK elements are installed, while the linux package repositories lag in getting things right.)
Another option seems to be building Qt from sources. But uninstalling the Qt Creator I got through KPackageKit and instead using the installer from Nokia was less involved, and worked for me in this case.

Resources