Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt 5 Unknown module(s) in QT: uitools

Tags:

qt

qt5

qmake

I just started to use Qt today and I don't know if I did something wrong when I installed it but I can't use QFormBuilder.

Linux Xubuntu 64b

what I did:

  • I clone this repo : [email protected]:qt/qt5.git
  • init_repository >> ./configure >> make >> sudo make install
  • I downloaded qt-creator http://qt-project.org/downloads#qt-creator
  • I created a new project and when I try to include QFormBuilder he tell me that he doesn't know this file.

So, I saw somewhere someone who says that I need to add QT += uitools to the project file, but now when I try to use qmake, I am getting Unknown module(s) in QT: uitools.

Sorry for my english and thank you for your help.

like image 293
hidewak Avatar asked Dec 18 '13 23:12

hidewak


3 Answers

If you get

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

you are missing qttools5-dev package.

like image 141
svlasov Avatar answered Nov 16 '22 20:11

svlasov


Have you actually read the documentation?

It writes this at the beginning:

The QFormBuilder class is used to dynamically construct user interfaces from UI files at run-time. More...

Header: #include

qmake: QT += designer

Inherits: QAbstractFormBuilder.

So, just follow that and put this into your qmake project file:

QT += designer

or you can invoke qmake like this:

qmake QT += designer

Of course, you need to make sure that you have the designer installed properly for this. You will need to install a package like libqt5designer5 on your Ubuntu, or if you had installed Qt manually, you will need to install the designer manually as well.

I am not that familiar with Ubuntu. You may need to install some corresponding development package as well. Either way, the point is that the library and headers need to be installed properly on your system which you seem to lack when getting Project ERROR: Unknown module(s) in QT: designer after either of the aforementioned solutions.

like image 28
lpapp Avatar answered Nov 16 '22 19:11

lpapp


To add to the answer by @svlasov, on RHEL or CentOS based systems (7.x or 8.x, etc.) you need to install:

yum install qt5-qttools-devel

Depending on the project you are building, you may also need to install qt5-qttools-static.

like image 2
scrutari Avatar answered Nov 16 '22 18:11

scrutari