22

How can I install/add a missing Qt Module under Mac OS? I have Qt Creator installed and working, but a new project gives the following error:

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

Can I just download and install the missing module or do I have to reinstall Qt with the missing module selected? Thanks

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313
user1829358
  • 1,041
  • 2
  • 9
  • 19

3 Answers3

29

Can I just download and install the missing module or do I have to reinstall Qt with the missing module selected?

You don't have to reinstall Qt. You can just use Qt Maintenance tool to to add components and to update or remove installed components.

  1. Launch Qt Maintenance Tool and choose Add or remove components. screenshot(1) screenshot(2)
  2. Add a tick to the Qt Charts component in your currently installed version of Qt. screenshot(3)
  3. Click the update button and wait for the process to complete. screenshot(4)
Mike
  • 8,055
  • 1
  • 30
  • 44
  • 11
    for clarity, the Maintenance tool is located in the Qt Install folder (after installation) - on mac osx it's called: MaintenanceTool.app – syberkitten Oct 08 '17 at 12:29
  • What repository settings have been configured for above answer ? – Vikrant Jul 16 '18 at 10:33
  • @Vikrant, the default Qt repositories. Qt charts is a module in Qt, no need to use any repositories other than the default ones... – Mike Jul 16 '18 at 11:27
  • @Mike i do not see all those modules referring to second screenshot. I might be missing something ? Currently using QT 5.7. – Vikrant Jul 17 '18 at 04:05
  • @Vikrant, I have just tested it. Maintenance tool still shows Qt charts in all versions from Qt 5.7 up to Qt 5.11... – Mike Jul 19 '18 at 14:00
  • @Mike Yes, just re-installed Qt and then enabled Qtcharts component while installation. It is working now. – Vikrant Jul 23 '18 at 06:16
  • This appears to be broken on Mac in 5.12.0. The maintenance tool won't advance beyond the page with "Add or remove components," saying, "At least one valid and enabled repository required for this action to succeed." And there's no apparent way to resolve it. – Oscar Mar 04 '19 at 09:27
  • 1
    @Oscar, you might want to take a look at [this question](https://stackoverflow.com/q/22775906). – Mike Mar 08 '19 at 20:05
  • Thanks, Mike. I have messed with manually specifying repository paths, and they just don't seem to work. They're either changing over time, or simply not in a recognized structure. It just happened again, so I went through that whole process. It turns out that there was a Qt update anyway, so I downloaded the entire installer again and reinstalled. – Oscar Mar 09 '19 at 01:29
  • Adding modules is not possible anymore on Windows too, no more modules can be selected :-( Looks like I have to reinstall 10GB again. – jaques-sam Sep 27 '19 at 15:15
  • @DrumM I don't have a PC to check at the moment, but I highly doubt that they would ever remove such a functionality. Have you read an announcement about this somewhere? What exactly happens when you try to follow the steps in my answer? – Mike Sep 27 '19 at 19:14
  • @Mike, there are no such options available. The problem could happen because of the login. I don’t know for sure, but in any case, there is no way to ADD options. – jaques-sam Sep 29 '19 at 15:23
  • @DrumM, so do you get only "update components" and "remove all components"? or are you unable to get into this page at all? I have just updated my Qt maintenance tool on Windows, and I still have the 3 options mentioned in my answer after skipping the login page. – Mike Oct 01 '19 at 06:47
  • No, I indeed have 3 options. So when selecting add or remove components, on the next page there is nothing to select more than was previously installed – jaques-sam Oct 02 '19 at 19:11
  • @DrumM seems to me like a problem reading available packages from the repositories. Does the progress bar counts to the end without any problems? – Mike Oct 02 '19 at 19:30
  • Mmm, no progress bar seen. Before clicking "next" on the "select components" window, there is no delay so it seems it is not checking for new components at all. For sure I have an internet connection... Btw, I had the same on another PC, so I'm definitely not the only one having this problem. Just can't find any topic about this. Seems like the Qt community is getting smaller :-( – jaques-sam Oct 04 '19 at 07:18
  • @Mike I tried installing it with Qt Maintenance, but the error persist : https://stackoverflow.com/questions/67986039/qtcharts-module-not-found-even-after-installing-in-qt-maintenance – silverfox Jun 16 '21 at 01:31
  • mike - can you help with this - https://stackoverflow.com/questions/72589559/mac-os-warning-project-error-unknown-modules-in-qt-webkitwidgets – samshers Jun 12 '22 at 08:36
  • I'm using Qt5.12.0, when I select `Add or remove components` it turns out `At least one valid and enabled repository required for this action to succeed` and I can only `Remove all components` – CN_Cabbage Jun 30 '22 at 03:48
0

I know this is 4 years later, but I just ran into this problem. The information I had said that I should run:

sudo apt install libqt5charts-dev

That was failing with the same error as the OP. After much searching, I found a reference to a package named "libqt5charts5-dev". When I tried using:

sudo apt install libqt5charts5-dev

that worked.

rallen911
  • 148
  • 9
  • Rallen - can you help with this - https://stackoverflow.com/questions/72589559/mac-os-warning-project-error-unknown-modules-in-qt-webkitwidgets – samshers Jun 12 '22 at 08:37
0

If you are using Windows, the best way to install the missing qt components would be to choose "Uninstall or Change a Program" in the Control Panel, the simply choose to "Change" the Qt program, then follow the instructions.

Kris Stern
  • 1,192
  • 1
  • 15
  • 23
  • Kris - can you help with this - https://stackoverflow.com/questions/72589559/mac-os-warning-project-error-unknown-modules-in-qt-webkitwidgets – samshers Jun 12 '22 at 08:37