Question

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 : git@gitorious.org: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.

Was it helpful?

Solution 3

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.

OTHER TIPS

If you get

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

you are missing qttools5-dev package.

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.

Read the documentation, it says to add the designer module to the .pro file:

QT += designer

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top