简体   繁体   中英

How to build Qt designer project only in Qt creator?

I am quite new to Qt environment.

I would like to add/change some code in Qt designer source code. And would like to see the changes by building it in Qt Creator.

I have installed Qt Creator 3.0.0. And I have downloaded qt-everywhere-opensource-src-4.8.4.zip.

I started the Qt Creator and build the project, and opened qt-everywhere-opensource-src-4.8.4/tools/designer/designer.pro

It parses without any error. And when I start Run button, I got this compile output:

In file included from ../../../designer/src/lib/uilib/abstractformbuilder.cpp:42:0: ../../../designer/src/lib/uilib/abstractformbuilder.h:51:29: fatal error: QtGui/QSizePolicy: No such file or directory compilation terminated. make2: * [abstractformbuilder.o] Error 1

I have found this file in qt-everywhere-opensource-src-4.8.4/include/QtGui/QSizePolicy

I guess, it should add it. But I do not know why it does not find it.

Any help will be appreciated.

If anyone knows different source code for Qt Designer(only) where I can build in Qt Creator, would be also nice.

The main purpose for me, is to change/add some code to the source code of Qt Designer to fit my interest. If I can achieve i by compiling another way, rather than in Qt creator, I would be happy to get instructions.

Thanks in advance.

I started the Qt Creator and build the project, and opened qt-everywhere-opensource-src-4.8.4/tools/designer/designer.pro

You cannot build designer on its own with Qt 4. You would need to build the whole software to get the designer included. That is, you would need to open the main projects.pro in qt-everywhere-opensource-src-4.8.4 directly.

However, it would probably be more beneficial if you grabbed Qt 5's designer in the first place since that is the currently developed major Qt version. Please follow these steps in order to accomplish that:

  • git clone git@gitorious.org:qt/qttools.git

  • Open the `qttools.pro inside that with your QtCreator.

  • Modify the source code as wished.

  • Build.

Please note that if you make changes, considering upstreaming them so that others can use the features or fixes you write for the software. You can contribute that through the Gerrit code review instance .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM