Qt Creator / C++ - Bug that prevents use of pointers and auto-completion -


i'm having serious issue qt creator. can no longer use pointers other classes , autocompletion doesn't work in primary class. feels has become corrupt, code working few pointers existing, @ once none of them worked , errored out.

line 21: inkpuppet *pointertopuppet; errors: x:\development\inkpuppet\newdialog.h:21: error: c2143: syntax error : missing ';' before '*' , x:\development\inkpuppet\newdialog.h:21: error: c4430: missing type specifier - int assumed. note: c++ not support default-int

here .pro file:

qt       += core gui  greaterthan(qt_major_version, 4): qt += widgets  target = inkpuppet template = app   sources += main.cpp\         inkpuppet.cpp \     aboutdialog.cpp \     inkspot.cpp \     newdialog.cpp  headers  += inkpuppet.h \     aboutdialog.h \     inkspot.h \     newdialog.h  forms    += inkpuppet.ui \     aboutdialog.ui \     newdialog.ui  other_files += \     inkpuppet.pro.user  resources += \     resources.qrc 

here default header. inkpuppet.h

#ifndef inkpuppet_h #define inkpuppet_h  #include "inkspot.h" #include "ui_inkpuppet.h"  #include <qmainwindow> #include <qwidget>  namespace ui { class inkpuppet; }  class inkpuppet : public qmainwindow {     q_object  public:     explicit inkpuppet(qwidget *parent = 0);     ~inkpuppet();      ui::inkpuppet *ui;  private slots:     void setminimum(int value);     void setmaximum(int value);     void actionnew();     void actionabout();     void testbutton(); };  #endif // inkpuppet_h 

newdialog.h

#ifndef newdialog_h #define newdialog_h  #include "inkspot.h" #include "inkpuppet.h" #include "ui_inkpuppet.h"  #include <qdialog>  namespace ui { class newdialog; }  class newdialog : public qdialog {     q_object  public:     explicit newdialog(qwidget *parent = 0);     ~newdialog();     inkpuppet *pointertopuppet;  private:     ui::newdialog *ui;  private slots:     void createnew();  };  #endif // newdialog_h 

  1. replace "inkpuppet *pointertopuppet;" "ui::inkpuppet *pointertopuppet;" fix compilation issue.
  2. reinstalling yoursdk may solve auto-completion issue. problem qt creator autocomplete code

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -