0
votes

I used Qt Creator 3.5.0 without any problems. But after these actions I got some issues:

  1. I always used Qt Creator without super permissions, but at that time I launched it as root
  2. After that I tried to run Qt Creator as usually but got a lot of errors like:

Cannot overwrite file /home/user/.config/QtProject/qtcreator/qtversion.xml: Permission denied

Could not save session to file /home/user/.config/QtProject/qtcreator/default.qws

Cannot overwrite file /home/user/.config/QtProject/qtcreator/qnx/qnxconfigurations.xml: Permission denied

  1. My Android emulator settings has been reset.
  2. I also got some messages like:

No .user settings file created by this instance of Qt Creator was found...

  1. I could not save some files due to:

Cannot set permissions for /home/user/QtProjects/test_project/mainwindow.cpp to writable. Could not save the files.

  1. /home/user/QtProjects/build-test_project-Desktop-Debug/ui_mainwindow.h:13: error: QtWidgets/QAction: No such file or directory

  2. But the main problem is that I can't use some my packages which are already installed:

No package 'gstreamer-video-1.0' found

No package 'gstreamer-1.0' found

Project ERROR: Unknown module(s) in QT: webkitwidgets

Some of these errors occurs with sudo, some - without.

I already tried to completely reinstall Qt, Qt Creator(using apt-get and online installer) and missing packages and I also removed dir QtProject and file QtProject.conf from /home/user/.config, but without success.

So how can I absolutely clean and purge Qt, its configs and settings and make pure reinstallation to solve these problems?

1
Check if /home/user/.config it self is owned by root. Nuke the build dir and change the permissions in the source folder to your user.Frank Osterfeld
@FrankOsterfeld problems with permissions are solved, but I still can't use packages which I used before.konstantin_doncov
What do you mean with "packages"?Frank Osterfeld
@FrankOsterfeld item #7 in the my question.konstantin_doncov
Are you sure you didn't change qt versions in the process? QtWebkit is deprecated and not part of the prebuilt Qt packages anymore, since Qt 5.6. So if you changed the Qt version from <= 5.5 to 5.6, this is expected.Frank Osterfeld

1 Answers

1
votes

To answer #2, #4, and #5 - these all stem from file ownership being by the 'root' user, caused by when you launched Qt Creator as root.

To fix these issues:

$ chown user:user -R /home/user/.config/QtProject/qtcreator
$ chown user:user -R /home/user/QtProjects
$ rm -Rf /home/user/QtProjects/build-test_project-Desktop-Debug

The first two directives makes sure that all the Qt projects you have in QtProjects and all Qt Creator user settings files are owned by the user, so it can be accessed by the Qt Creator project when launched by the user.

The last directive removes your build files, which will be regenerated when you next build - in case they are in an inconsistent state due to the permissions being wrong.

As to #7 - as what Frank Osterfeld mentioned, you have enabled Qt Webkit support in your project, and it's been removed from Qt as of Qt 5.6*. I would recommend replacing your usage of Qt Webkit with Qt WebEngine.

* https://wiki.qt.io/New_Features_in_Qt_5.6#Removed_Modules