How to get Qt Creator to work
-
I've just installed Qt Creator on openSUSE Leap 15.0 (V4.6.1 from the standard repositories) but I'm having trouble getting
it to work. I've got the main window up and went to the first tutorial 'Help: Build and Run Examples' (Grr! another annoying program that won't allow me to select text!). Clicking on that brings up a web page
https://doc.qt.io/qtcreator/creator-build-example-application.html
and that says I should go to an example, but there appear to be no examples installed. In that case, it says to check what Qt versions are installed and clicking on that link takes me to
https://doc.qt.io/qtcreator/creator-project-qmake.html and that says to select 'Tools > Options > Kits > Qt Versions > Add' but the Tools menu has an Options... button and when I select that I get (a modal WTF!) window with lots of possibilities but none of them is Kits.Oh, and those weblinks are to Qt Creator Manual 4.7.2 so there's a possibility that the documentation is wrong because it's a different version.
So what am I missing? Has openSUSE packaged it wrong so I'm missing some package or other, or is there a bug in Qt Creator, or do I have finger trouble?
-
Hi and welcome to devnet,
Did you also install the Qt development packages from openSUSE ?
-
Hi and thanks for your reply. I have some -devel packages installed but there are an awful lot of them and I don't know which ones I need. It seems to me that either they should be required or recommended by the package system or else Qt Creator should tell me that they are needed for what I am trying to do.
Anyway, as a result of your question I installed a package called libqt5-qtbase-examples and now examples seem to be present. But that package is neither required not recommended by libqt5-creator so I'm still convinced there is a packaging error. I've bug-reported it.
-
Can you post the link ?
-
@SGaist said in How to get Qt Creator to work:
Can you post the link ?
You mean to the bug? https://bugzilla.opensuse.org/show_bug.cgi?id=1115290
But I can't post a reply yet, so you'll have to wait!
While I was waiting, I tried to compile the addressbook example, but it failed with:
../part1/addressbook.cpp:51:10: fatal error: QtWidgets: No such file or directory
#include <QtWidgets>
^~~~~~~~~~~
compilation terminated.Now I have libQt5Widgets & libQt5Widgets-devel installed, but not the 32 bit versions (I'm on a 64-bit machine) and not libQt5Widgets-private-headers-devel so I'm not clear what it thinks I need now.
All in all, Qt Creator isn't looking very user-friendly. I was hoping for a tool that would led me create UIs graphically, and certainly for something that runs out of the box. This feels like the 90s. Are there alternatives?
-
@SGaist said in How to get Qt Creator to work:
Can you post the link ?
You mean to the bug? https://bugzilla.opensuse.org/show_bug.cgi?id=1115290
But I can't post a reply yet, so you'll have to wait!
While I was waiting, I tried to compile the addressbook example, but it failed with:
../part1/addressbook.cpp:51:10: fatal error: QtWidgets: No such file or directory
#include <QtWidgets>
^~~~~~~~~~~
compilation terminated.Now I have libQt5Widgets & libQt5Widgets-devel installed, but not the 32 bit versions (I'm on a 64-bit machine) and not libQt5Widgets-private-headers-devel so I'm not clear what it thinks I need now.
All in all, Qt Creator isn't looking very user-friendly. I was hoping for a tool that would led me create UIs graphically, and certainly for something that runs out of the box. This feels like the 90s. Are there alternatives?
@daveh said in How to get Qt Creator to work:
All in all, Qt Creator isn't looking very user-friendly.
You have not managed to install everything (which is probably a packaging problem related to your distro) and can already claim how user-friendly that program is?!
I was hoping for a tool that would led me create UIs graphically, and certainly for something that runs out of the box.
That's what QtCreator together with Qt provides.
You can try the online installer: http://download.qt.io/official_releases/online_installers
But make sure to only install one Qt version (e.g. 5.11.2) suited to your platform, as there are versions for Android etc. also. (Note: I have selected some preview releases, you should probably not do this).
Regards
-
@SGaist said in How to get Qt Creator to work:
Can you post the link ?
You mean to the bug? https://bugzilla.opensuse.org/show_bug.cgi?id=1115290
But I can't post a reply yet, so you'll have to wait!
While I was waiting, I tried to compile the addressbook example, but it failed with:
../part1/addressbook.cpp:51:10: fatal error: QtWidgets: No such file or directory
#include <QtWidgets>
^~~~~~~~~~~
compilation terminated.Now I have libQt5Widgets & libQt5Widgets-devel installed, but not the 32 bit versions (I'm on a 64-bit machine) and not libQt5Widgets-private-headers-devel so I'm not clear what it thinks I need now.
All in all, Qt Creator isn't looking very user-friendly. I was hoping for a tool that would led me create UIs graphically, and certainly for something that runs out of the box. This feels like the 90s. Are there alternatives?
@daveh said in How to get Qt Creator to work:
While I was waiting, I tried to compile the addressbook example, but it failed with:
../part1/addressbook.cpp:51:10: fatal error: QtWidgets: No such file or directory
#include <QtWidgets>
^~~~~~~~~~~
compilation terminated.OK I managed to solve this by poking about. In Tools > Options > Build & Run there is a Kits tab and it shows Desktop (default) with an exlamation mark in a yellow triangle alongside it, which I presume is some sort of warning. There's no indication of what the warning means but lower down I noticed that the Qt version selection was set to my host system's Qt 4.8.7 rather than the Qt 5.9.4 I'm trying to develop using. So I changed that (I've no idea why that wasn't done automatically when I set the Qt version), restarted Qt Creator and the project now builds and runs.
Now I'll try some more examples and hopefully understand some more.
-
@daveh said in How to get Qt Creator to work:
While I was waiting, I tried to compile the addressbook example, but it failed with:
../part1/addressbook.cpp:51:10: fatal error: QtWidgets: No such file or directory
#include <QtWidgets>
^~~~~~~~~~~
compilation terminated.OK I managed to solve this by poking about. In Tools > Options > Build & Run there is a Kits tab and it shows Desktop (default) with an exlamation mark in a yellow triangle alongside it, which I presume is some sort of warning. There's no indication of what the warning means but lower down I noticed that the Qt version selection was set to my host system's Qt 4.8.7 rather than the Qt 5.9.4 I'm trying to develop using. So I changed that (I've no idea why that wasn't done automatically when I set the Qt version), restarted Qt Creator and the project now builds and runs.
Now I'll try some more examples and hopefully understand some more.
@daveh said in How to get Qt Creator to work:
There's no indication of what the warning means
Put the mouse cursor over the yellow exclamation mark...
-
@daveh said in How to get Qt Creator to work:
There's no indication of what the warning means
Put the mouse cursor over the yellow exclamation mark...
@jsulm said in How to get Qt Creator to work:
@daveh said in How to get Qt Creator to work:
There's no indication of what the warning means
Put the mouse cursor over the yellow exclamation mark...
Ah thanks. I did do that without success but I just did it again. The full instructions are 'put the mouse cursor over the yellow triangle and LEAVE IT THERE for some time (longer than I normally expect for a tooltip to popup)'