PDA

View Full Version : Qt Creator syntax highlighting



zaphod.b
11th June 2013, 13:13
Consider this header file:


#include <QListView> //doesn't highlight...
//#include <QtWidgets> //highlights...
//#include <QtWidgets/QListView> //doesn't highlight...
//#include <QtGui/QListView> //highlights...

class IssueView : public QListView //...QListView here
{
Q_OBJECT
public:
IssueView();
};

When editing this file in Qt Creator 2.7.0 (and using Qt 5.0.2), QListView is either highlighted or not (see in-code comments), depending on the (mutually exclusive single) #include. The way highlighting works implies it mingles with Qt4, doesn't it?

My build is ok and based solely on the Qt5 local to my home as the compile output confirms. The system version in /usr is Qt4 but shouldn't be used.

Is my guess correct? How can I overcome this?