[Interest] qmlscene install problems (was: Interest Digest, Vol 82, Issue 5)

Ulf Hermann ulf.hermann at qt.io
Mon Jul 16 13:12:25 CEST 2018

This thread has gone so far south, we need to add some corrections ...

First things first: You probably don't need qmlscene. The only project type that currently needs qmlscene to be available is the "Qt Quick UI Prototype". Unless you are working with such projects, you can ignore the warning.

>>> I just installed Qt Creator 4.5.2 from kubuntu apt sources.
>>> It installed qmlscene + qt development files at the same time.
>>> I can see clearly there is a qmlscene executable right next to qmake in 
>>> the same directory: /usr/lib/qt5/bin
>>> How do I get rid of the "no qmlscene installed" warning?

This may not be the place where Qt Creator expects qmlscene on your system. For example, on my system I have a /usr/bin/qmlscene, which is not an actual qmlscene binary, but belongs to a package called "qtchooser". qtchooser wraps different Qt versions on demand. The same holds for qmake itself, actually. On my system, just calling /usr/bin/qmake results in an error, because qtchooser defaults to Qt4 and I purposely don't have a Qt4 environment installed. Qt Creator will actually query the qmake that belongs to your Qt for the binary locations, and it has some heuristics on which one that might be. For me that results in something like:

# /usr/lib/x86_64-linux-gnu/qt5/bin/qmake -query

Qt Creator will list the results of that query in the Qt Version options in Build & Run settings (press "Details" there). You can check if there is a qmlscene in the path given there, and if not, search the package database for one.

So, it turns out I have another qmake (and qmlscene) in /usr/lib/x86_64-linux-gnu/qt5/bin/ which are explicitly the right ones, and which I can invoke manually if I actually need them. Qt Creator autodetects those. I could also configure qtchooser to use them.

>> I've been using Creator from distro repos for a while in the past, and 
>> quite often this would result in some weirdness or breakage. I recommend 
>> installing Creator using the online installer instead.

You can just install the package that contains the right qmlscene binary for your Qt version. Debian has a separate package called "qmlscene". I don't know how that works on Ubuntu. In fact the online installer won't get you very far, unless you are willing to also use a version of Qt obtained via the same online installer. This whole thing is a problem of your Qt version and indeed possibly of Ubuntu messing up the paths. It's probably not a problem of Qt Creator.

> 1) Some fool used qml to create the welcome screen thus first introducing the problem. qml should never be used for anything.
> 2) The 12 year old boys who crow about being "maintainers" of packages do little in the way of actual maintenance and testing. They simply remove anything someone complains about or which doesn't compile.
> 3) Ubuntu doesn't test shit. They rely on the YABUs (Yet Another uBUntu) to provide fixes for them
> 4) Virtual Machines tend to hose QtCreator, or at least historically did.
> https://bugreports.qt.io/browse/QTCREATORBUG-958> [...]

And none of that has anything to do with qmlscene being installed or not, or how Qt Creator deals with it. Also, the qmlscene utility and the QML language are two rather different things. The welcome screen (used to) be written in QML, but Qt Creator doesn't use qmlscene to run it. So, all of this rant is as misplaced as it is unnecessary. The only thing that may be remotely relevant is the comment about Ubuntu's testing practices, but the information we have here is far from being conclusive on this being an actual problem. The author should be sorry for wasting everybody's time.

best regards,
Ulf Hermann

More information about the Interest mailing list