Ubuntu 14.04 QtCreator Qt5 examples missing
Solution 1
To get the Qt5.2 examples available in Qt Creator/Ubuntu SDK, you basically need two extra packages, open a Terminal with Ctrl+Alt+t an type:
sudo apt-get install qtbase5-examples qtbase5-doc-html
Restart Qt Creator to get:
Solution 2
I don't have enough reputation to comment on Sylvain's answer so my answer here is to back it up and expand as per gaoithe's comments.
In my case running Qt Creator 3.0.1 based on Qt 5.2.1. (on Ubuntu 14.04)
I had qtbase5-examples qtbase5-doc-html
already installed, but was still missing network and multimedia examples (and others evidently, but these were the ones I cared about).
After installing the following additional packages:
qt4-demos qt4-doc qt4-doc-html qt5-doc qt5-doc-html
Now I have a shed load of examples that I didn't know were missing.
Thanks
Solution 3
In Ubuntu 18.04 the QtCreator examples and API docs missing, This is my way to solve this problem, should apply to almost every Ubuntu release.
For QtCreator and Examples and API Docs:
sudo apt install `apt-cache search 5-examples | grep qt | grep example | awk '{print $1 }' | xargs `
sudo apt install `apt-cache search 5-doc | grep "Qt 5 " | awk '{print $1}' | xargs`
sudo apt-get install build-essential qtcreator qt5-default
If something is also missing, then:
sudo apt install `apt-cache search qt | grep 5- | grep ^qt | awk '{print $1}' | xargs `
Hope to be helpful.
Solution 4
I'm on Ubuntu 20.04 and also suffering this "examples not showing" issue. Also, when opening an existing qt-based project, it complains "kits is not OK to use".
And if I do sudo qtcreator
, these problems disappear.
Finally, by manually choosing qmake to select the proper qt version it is solved.
i.e. in Menu > Settings > Kits > Kits > Qt Version, if it is None, manage it, choosing /usr/bin/qmake
, then save.
Solution 5
In Linux Mint 18.1 using Qt Creator 3.5.1 based on Qt 5.5.1, I had to run:
sudo apt-get install qtbase5-examples qtbase5-doc-html qt4-demos qt4-doc qt4-doc-html qt5-doc qt5-doc-html
Then I got a substantial number of Examples shown in the Welcome Screen.
Related videos on Youtube
Divine
German student of computer science Python web developer, mainly Django currently on the Docker trip
Updated on September 18, 2022Comments
-
Divine almost 2 years
After upgrading to Ubuntu 14.04 I removed the official qtcreator in order to install the modified version from the software center because I'd like to try the SDK.
Fortunately, the docs are now included in the official installation. Unfortunately, there is still something missing: the official examples. Luckily I had my old and official installation still on my harddrive and then, after some tries, I copied the examples to
/usr/lib/x86_64-linux-gnu/qt5/examples
and change the permission. Then QtCreator detected examples and I was able to select them from the examples section.But there are still two problems remaining:
Firstly, I am not able to find all examples e.g the network examples (like the fortuneclient) are still missing. For the sake of testing I change the permission of the example folder to
777
. Therefore permission shouldn't be a problem.Secondly, some helping documents to the examples are missing. Therefore I get a normal editor and a blank right part after clicking on an example.
-
Admin almost 10 yearsO.K. this help but installed QT Creator main help page is still missing.
-
Joey Adams about 7 yearsUnder Ubuntu 17.04, I also had to install
qt5-default
, which is a "kit" needed to even open the basic examples.
-
-
gaoithe almost 10 yearsI had to install a few more packages before examples and qtcreator help were working. In particular qtcreator-doc. Use 'apt-cache search qt |grep -E "doc|demo|tut|examp"' to see what you might wish to install. Some packages I have installed: 'dpkg-query -l |awk '{print $2}' |grep qt |grep -E "doc|demo|tut|examp" |fmt' qt4-demos qt4-doc qt4-doc-html qt5-doc qt5-doc-html qtbase5-doc qtbase5-doc-html qtbase5-examples qtcreator-doc
-
Sylvain Pineau over 9 yearsOP asked for qt5 examples, those are are using the Qt4 API. But it's always good to have them installed. +1
-
Pobbel over 9 yearsIn my case I think the absence of some of the Qt5 examples was resolved by installing the
qt5-doc qt-5-doc-html
packages in particular. I did have some examples in the Qt5 directory that were not showing until these packages were installed. -
Jim Blackler about 5 yearsThat finally fixed it for me.
-
0xC0000022L over 3 yearsOn Ubuntu 20.04 this doesn't work at all. The Qt5 examples can apparently not be loaded from a read-only location (
qmake -query "QT_INSTALL_EXAMPLES"
). -
0xC0000022L over 3 yearsWell you seem to be installing Qt4 examples, so could you check whether that substantial number of examples is even related to Qt5?! Or whether any of the Qt5 examples show up? For me on Ubuntu 20.04 none show up. Only if I happen to start
qtcreator
privileged. The reason seems to be that the folderqmake -query "QT_INSTALL_EXAMPLES"
is read-only. -
0xC0000022L over 3 yearsUsing
sudo
other than for testing purposes is a really bad advice for running an application likeqtcreator
. PLEASE don't do that. The very last point, however, was spot on. I've even had that with the version installed from the "web installer" before. -
Aarony Jamesys almost 3 yearsYup, thank you, this worked for me.