Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Luna, CDT 8.4 and Qt(automatic .pro file update)
icon5.gif  Luna, CDT 8.4 and Qt [message #1387755] Wed, 25 June 2014 14:45 Go to next message
Dimitar Asenov is currently offline Dimitar AsenovFriend
Messages: 3
Registered: June 2014
Junior Member
After reading the new and noteworthy changes for CD 8.3:
https://wiki.eclipse.org/CDT/User/NewIn83
I was excited that Qt might finally get proper support in Eclipse. Now that Luna and CDT 8.4 are out I couldn't wait to give the Qt support a try hoping at least basic functionality would work just fine. I pretty much only care about QMake and the indexer working fine, I don't need fancy UI editors, QML, etc.

After downloading the fresh Eclipse 4.4 release and the extra Qt support plug-in (not installed by default) I made the follwing observations:
- Syntax highlighting works fine - good
- The indexer could process Qt headers - awesome
- QMake is automatically run to generate Makefiles - good
- No automatic updates of the .pro file - bad

So the editor and indexer seem to work, but when I add a new class for example, it is not automatically inserted in the .pro file. The old Nokia Qt integration plug-in used to do that, and my understanding is that this should be fairly simple to automate.

Are there any plans to improve the QMake support with this feature? Is there any way to achieve it with CDT 8.4?

Thanks.
Re: Luna, CDT 8.4 and Qt [message #1387863 is a reply to message #1387755] Wed, 25 June 2014 17:54 Go to previous messageGo to next message
Doug Schaefer is currently offline Doug SchaeferFriend
Messages: 135
Registered: July 2009
Senior Member
Thanks! I'm glad it's useful. And, yes, it's still a work in progress and updating the .pro files is definitely on the roadmap as is more automated management of qmake calls at build time. I'd like to have that in place by the September release.

The tough thing will be getting QML editor support and I'm working on that as well but it may take more time. It's glad to hear that better qmake support is probably a higher priority. I'll address that first, though it would be good to hear from others.

Cheers,
Doug.
Re: Luna, CDT 8.4 and Qt [message #1388989 is a reply to message #1387863] Fri, 27 June 2014 07:17 Go to previous messageGo to next message
Nobody Mising name is currently offline Nobody Mising nameFriend
Messages: 75
Registered: July 2010
Member
And what about more useful things like:
- proper completion for signal/slots inside macros SIGNAL/SLOT?
- displaying Qt-specific types in the debugger (especially MinGW toolchain)?
- easy way to open Qt documentation from code or during completion?
Re: Luna, CDT 8.4 and Qt [message #1389040 is a reply to message #1388989] Fri, 27 June 2014 08:49 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Quote:
- displaying Qt-specific types in the debugger (especially MinGW toolchain)?

Your gdb version should support Python. Then you can use the Python pretty printer.
If have used the pretty printers from Kdevelop (you can remove the KDE parts and use only the pure Qt classes)
Get https://projects.kde.org/projects/extragear/kdevelop/kdevelop/repository/revisions/master/changes/debuggers/gdb/printers/qt4.py
and save it as qt_printers_gdb

- to use it put the following lines in your ~/.gdbinit

python
import sys
sys.path.insert(0, '/path/to/qt_printers_gdb')
from qt_printers_gdb import register_qt4_printers 
register_qt4_printers (None)
end
set print pretty 1



Quote:
- easy way to open Qt documentation from code or during completion?

Trolltech and then Nokia provided for some time an Eclipse plugin for Qt which also contained help files. Unfortunately, the Nokia download link is not available anymore after Nokia "joined" Microsoft. But you can still find it in the Internet, e.g. from ftp://ftp.informatik.hu-berlin.de/pub/Linux/Qt/QT/qteclipse

You should download the file com.trolltech.help_4.6.1.zip and unzip it in your eclipse/dropins folder. Direct linking between code and help is still not possible but you can search for the Qt classes then in the help system in Eclipse.
Keep in mind this is the documentation only for Qt 4.6 Sad
Newer versions are accessible from the Qt homepage directly http://qt-project.org/doc/qt-5/classes.html

Perhaps someone finds a way to convert the Qt help to Eclipse help ...


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Luna, CDT 8.4 and Qt [message #1397817 is a reply to message #1389040] Thu, 10 July 2014 07:40 Go to previous messageGo to next message
Dimitar Asenov is currently offline Dimitar AsenovFriend
Messages: 3
Registered: June 2014
Junior Member
Just one more thing. As far as I see now, setting the Qt version (directory) can only be done on a per project basis. There needs to be a workspace-wide setting for this. Otherwise, project files commited to a repository, will be specific for a particular user's installation environment.
Re: Luna, CDT 8.4 and Qt [message #1403769 is a reply to message #1387755] Sat, 26 July 2014 14:59 Go to previous messageGo to next message
Kamil Saigol is currently offline Kamil SaigolFriend
Messages: 7
Registered: July 2014
Junior Member
Dimitar Asenov wrote on Wed, 25 June 2014 10:45
After reading the new and noteworthy changes for CD 8.3:
https://wiki.eclipse.org/CDT/User/NewIn83

After downloading the fresh Eclipse 4.4 release and the extra Qt support plug-in (not installed by default) I made the follwing observations:
- Syntax highlighting works fine - good
- The indexer could process Qt headers - awesome
- QMake is automatically run to generate Makefiles - good
- No automatic updates of the .pro file - bad



Where can the Qt support plug-in be found?
Re: Luna, CDT 8.4 and Qt [message #1404945 is a reply to message #1403769] Wed, 06 August 2014 07:57 Go to previous messageGo to next message
Dimitar Asenov is currently offline Dimitar AsenovFriend
Messages: 3
Registered: June 2014
Junior Member
Kamil Saigol wrote on Sat, 26 July 2014 10:59

Where can the Qt support plug-in be found?


It is in the standard Luna repository: http://download.eclipse.org/releases/luna

Under: Programming Languages > C/C++ Qt Support
Re: Luna, CDT 8.4 and Qt [message #1408531 is a reply to message #1404945] Fri, 15 August 2014 09:48 Go to previous messageGo to next message
Dietmar Wagner is currently offline Dietmar WagnerFriend
Messages: 1
Registered: August 2014
Junior Member
Dimitar Asenov wrote on Wed, 06 August 2014 03:57
Kamil Saigol wrote on Sat, 26 July 2014 10:59

Where can the Qt support plug-in be found?


It is in the standard Luna repository: http://download.eclipse.org/releases/luna

Under: Programming Languages > C/C++ Qt Support


Hi Dimitar,

what I want to do is, using qt 5.3.1 together with Eclipse Luna and CDT C++ 8.4.0 on a Win7 platform. Unfortunately I'm a beginner in Qt and Eclipse and I have problems to get a running system.

What I have done is, I have installed the following packages:
eclipse-cpp-luna-R-win32.zip
qt-opensource-windows-x86-mingw482_opengl-5.3.1.exe
mingw-get-setup.exe
C/C++ Qt Support
setting the PATH in windows environment C:\MinGW\bin;c:\Qt\Qt5.3.1\5.3\mingw482_32\bin

My problem is, if I want to create a new C++ project using Qt in "Project type" I cannot see any support for Qt expect in "Makefile project" the "Qt5 Hello World Project". If I try to make a "Qt5 Hello World Project" I get a lot of errors:

Function 'QStringLiteral' could not be resolved Hello World.cpp /Hello World/src line 14 Semantic Error
Function 'quit' could not be resolved Hello World.cpp /Hello World/src line 17 Semantic Error
Function 'quit' could not be resolved Hello World.cpp /Hello World/src line 17 Semantic Error
Function 'SIGNAL' could not be resolved Hello World.cpp /Hello World/src line 17 Semantic Error
Function 'SLOT' could not be resolved Hello World.cpp /Hello World/src line 17 Semantic Error
make: *** [QtMakefile] Error 2 Hello World C/C++ Problem
Method 'connect' could not be resolved Hello World.cpp /Hello World/src line 17 Semantic Error
Method 'engine' could not be resolved Hello World.cpp /Hello World/src line 17 Semantic Error
Method 'exec' could not be resolved Hello World.cpp /Hello World/src line 19 Semantic Error
Method 'rootContext' could not be resolved Hello World.cpp /Hello World/src line 13 Semantic Error
Method 'setContextProperty' could not be resolved Hello World.cpp /Hello World/src line 13 Semantic Error
Method 'setSource' could not be resolved Hello World.cpp /Hello World/src line 14 Semantic Error
Method 'show' could not be resolved Hello World.cpp /Hello World/src line 15 Semantic Error
recipe for target 'QtMakefile' failed Makefile /Hello World line 12 C/C++ Problem
Type 'QGuiApplication' could not be resolved Hello World.cpp /Hello World/src line 8 Semantic Error
Type 'QQuickView' could not be resolved Hello World.cpp /Hello World/src line 12 Semantic Error


Now my questions:
does the Qt plugin do not work correctly?
is there missing something to installed?
where can I find a detailed installation description?
what have I do else to install for using Qt?

Cheers,
Dietmar
Re: Luna, CDT 8.4 and Qt [message #1446328 is a reply to message #1387755] Thu, 16 October 2014 17:43 Go to previous messageGo to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 1
Registered: October 2014
Junior Member
Hello,
I tried this plugin without success. I just need Eclipse to index my code.
I have installed Eclipse CDT Luna and C/C++ Qt support on a Ubuntu OS.

I added all the subfolders of QT /usr/include/qt4/* into
Properties > C/C++ general > Path and Symbols
Also I checked (without knowing exactly what it does) the "Qt installed Headers" into
Properties > C/C++ general > Preprocessor Include Paths, Macros etc > tab Providers

Some of QT objects are recognised but much of them are not (macros, slots, etc..)

Disd I miss something ?
Thank you for any answer.
Re: Luna, CDT 8.4 and Qt [message #1677323 is a reply to message #1387755] Sun, 15 March 2015 21:29 Go to previous messageGo to next message
tout pres is currently offline tout presFriend
Messages: 2
Registered: March 2015
Junior Member
hello,
thank you for the information.
I'd like to use Qt libraries but without leaving eclipse-cdt (yes, C++).

Do you know please a site where any "concrete" information (i.e configure eclipse luna with Qt libraries) about this ?
Thank you, Dominique
Re: Luna, CDT 8.4 and Qt [message #1682708 is a reply to message #1677323] Tue, 17 March 2015 21:00 Go to previous messageGo to next message
tout pres is currently offline tout presFriend
Messages: 2
Registered: March 2015
Junior Member
hello Dominique (well ...I reply to myself),

see other replies before asking this general question Smile Plugin is under: Programming Languages > C/C++ Qt Support

The "Hello World from Qt 5" proposed in eclipse compiles and run without problems ...but it is necessary to install this on Fedora 21 before :

# cp /usr/bin/qmake-qt5 /usr/bin/qmake
# yum install qt5-qtdeclarative-devel

personnaly I 've also installed qtcreator (yes it works on fedora 21):
see files in in download.qt.io/official_releases/qtcreator/3.3/3.3.2/
$ ./qt-creator-opensource-linux-x86_64-3.3.2.run
Dominique
icon9.gif  Re: Luna, CDT 8.4 and Qt [message #1693133 is a reply to message #1387755] Wed, 22 April 2015 02:30 Go to previous message
Kazuyo Mizuno is currently offline Kazuyo MizunoFriend
Messages: 1
Registered: April 2015
Junior Member
Hello,
I tried this plugin on Mac OS Yosemite. I just need Eclipse to index my code.
But I couldn't get successful result.

- Some of QT objects are recognised but much of them are not (macros, slots, etc..)
- Eclipse works for "Serialize CDT language setttings entries", and it does not progress for a day.

I added include paths of Qt headers. But nothing is changed.
Did I need to do something else?
Thank you for any answer.
Previous Topic:Eclipse project compile from command line?
Next Topic:content assist in classes for members declared below
Goto Forum:
  


Current Time: Thu Mar 28 16:38:02 GMT 2024

Powered by FUDForum. Page generated in 0.05938 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top