This page contains a large list of common issues students have had when setting up and using Qt Creator. Consider searching this page using Ctrl+F (Command+F on Mac) to try to jump quickly to the text of the relevant error message or issue.
A: This means that you tried to use a function you didn't define. Often this is because of a difference between the parameters or return type in the function prototype and function definition. To get more information about the error, click on the "4 Compile Output" tab near the bottom of the screen, and scroll up to find any relevant lines of error messages:
Could not find qmake configuration file default. Error while parsing file /Users/foobar/cs106b/Life/Life.pro. Giving up.
A: This is just a warning message that you should be able to ignore. If you are able to build and run the project, you don't have to worry about this message. Some students have reported that this warning goes away if you go to the Qt Creator Options → Build & Run → Kits tab, and then set one of your actual "kits" to be the default, not "manual" or "Desktop". But you shouldn't need to do this.
A: This sometimes means Qt Creator is confused about what files should / shouldn't be part of your project. Follow the steps below to re-initialize your project.
A: Usually this means that there is a problem with your Java JDK installation. Most commonly this occurs on a Windows machine when you have multiple versions of Java installed. The best fix is to uninstall all older versions of Java from your machine. Go to Control Panel → Programs → Uninstall Programs. In the list that pops up, scroll down to the "J" area and look for "Java". If you see multiple entries there, uninstall all of them other than Java JDK/SDK 1.8. (In particular, look for and remove "JRE" or "Java Runtime Environment" entries, and remove any versions of Java older than 1.8.)
If removing old versions of Java doesn't solve the problem, and you are using Windows 7 or higher, try the following advanced option. First, go figure out where exactly your Java JDK has been installed on your system. Look in C:\Program Files\Java or C:\Program Files (x86)\Java for folders whose names start with "jdk". In our example, the folder name is "C:\Program Files\Java\jdk1.8.0_60" , but substitute whatever your folder is called.
Once you have found out where Java is installed, open a Command Prompt (press the Windows key or Start button, then type "command prompt" and choose the first option that appears.) A black console window should appear. Into that window, type the following command and press Enter:
setx JAVA_HOME "C:\Program Files\Java\jdk1.8.0_60"
No output should appear when you press Enter. But now if you restart Qt Creator and re-run your project, it may be able to locate your Java JDK installation properly.
A: It means that your executable is still running from the last time you ran/tested the program a moment ago. Make sure to shut down any previously running instances of your program. You might need to open your operating system's Task Manager to stop them all.
To get more information about the error you need to run your code in a debugger. Instead of clicking on the green arrow (Ctrl + R) to run your program, click the green arrow with a bug on it (F5). When your program encounters the error which caused the problem in the first place, you'll be placed in a debugger looking at the exact moment the crash occured.
A: Don't follow those message prompts that pop up; unfortunately they lead you to the wrong version of Java. Go to this Oracle Java download page to download and install Java JDK on your Mac.
A: Open up System Preferences (in your Applications folder), go to Security and Privacy, and click the lock in the bottom left (and enter your password). In the menu under "Allow apps downloaded from:", choose "Anywhere" and click the lock to save. Now, install Qt Creator. Once you're done installing, click the lock again, choose "Mac App Store and identified developers", and click the lock once more to save. Another fix: Instead of double-clicking the .dmg file when you install, right-click it and choose Open.
A: This error sometimes shows up with newer versions of Xcode. Apple completely removed the "gdb" debugger from Xcode 5, so you have to use a new debugger called "LLDB" instead. Future versions of Qt Creator will detect this automatically, but Xcode 5 was released quite recently, so for now we have to fix this manually.
To fix the issue, click Qt Creator => Options => Build & Run => Kits. Click on the auto-detected kit => click clone => make default. Find the line which says debugger, and click edit. Change the selection from "GDB engine" to "LLDB engine", and type in "/usr/bin/lldb" in the text box.
Once you finish doing that, you'll need to close Qt Creator. Go to the directory where you keep your assignment, and delete all files ending in ".pro.user". Then, click on the .pro file and you can reconfigure your project with the debugger ready to go.
A: This error seems to happen when your system updates Xcode to version 7, which is not fully compatible with Qt Creator. Here are a few things you can try that may fix it.
1) Modify .pro file: Double-click your project's .pro file in the Qt Creator left panel. It will open in a text editor window. Scroll down to the following line:
QMAKE_MAC_SDK = macosx
Change that line to the following, then save and recompile.
QMAKE_MAC_SDK = macosx10.11
2) Downgrade to Xcode 6: Only try this if option (1) above didn't solve the problem.
A: I don't know why this fixes it, but if you poke it a few times by putting breakpoints in your code as it's starting up, it'll work fine. (Number of pokes required varies.) Another thing that can work is clicking "Windows" -> "Views" -> "Debugger Log" and then entering any text you would like in the console to the left of the "Command: " prompt that now becomes visible in your Debug view. Number of pokes here is generally only one.
A: Qt Creator gets confused when you add files to an existing project that has already been initialized. The best way to add a new file to a project is to close Qt Creator, put a blank new file into your project's src/ directory using your operating system's file explorer / finder. Then "re-initialize" your project as described below. (The same holds true if you want to add an input file like a text file or image to your project's res/ or "Other Files" directory.)
A: It could be any of several reasons: Maybe you added a file to their project in Qt Creator, which adds a double-entry in your .pro file. Maybe you used "add a C++ class" feature in QtC, same thing. Maybe you forgot #ifndef around a .h file (if it's a later assignment about classes and objects). Whatever you did, the best thing to try is to "re-initialize" your project as described below.
#include "console.h"
A: This error can happen for a lot of reasons. Sometimes you renamed or deleted etc. a file in res/ that the compiler is looking for. Usually the best thing to try is to "re-initialize" your project as described below. If that doesn't fix it, click the bottom "4 Compile Output" tab, copy/paste its entire output into an email to the instructor and TA, and they may be able to help you.
A: This error can happen for a lot of reasons. Most often we have seen it when the student is running an international version of Windows (e.g. Chinese, Korean, etc.) and has folder or file names that contain international characters in them. Try moving your project into a simple folder name containing only English characters, and then "re-initialize" your project as described below. If that doesn't fix it, click the bottom "4 Compile Output" tab, copy/paste its entire output into an email to the instructor and TA, and they may be able to help you.
A: About 90% of random Qt Creator issues we've seen can be resolved by "re-initializing" your project. Here are the steps to re-initialize a project. (Please note that these steps involve deleting some files from your computer. Be careful not to delete your assignment solution code. Make frequent backups of your files.)
Steps to re-initialize a project:
If you tried to follow the above steps and were not successful, we will try our best to help you figure it out. If it's a laptop, you can bring it to office hours and show us the problem. Or you can email us. If you email, please include the following information:
Thanks, and good luck! You can do it!