Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools

Intellisense is broken even for newly created projects



    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Fixed
    • Affects Version/s: 2.6.0 (rev.07)
    • Fix Version/s: 2.7.0
    • Component/s: General
    • Labels:
    • Environment:
      Windows 10, Qt 5.15.1, VS 2019 16.7.6, addins 2.6.0 (rev 7)
    • Platform/s:
    • Commits:


      Intellisense is completely broken on my computer, even for freshly created projects, with the last version of each tool.

      Steps to reproduce :

      1) New Qt widget app project
      2) Create, Next next next finish (don't enable precompile header it is worse)
      3) The project is well created, but it has 2 intellisense errors related to the ui file

      Error (active) E0276 name followed by '::' must be a class or namespace name QtWidgetsApplication11 C:\Users\Nicolas\Source\Repos\QtWidgetsApplication3\QtWidgetsApplication11\QtWidgetsApplication11.h 14
      Error (active) E1696 cannot open source file "ui_QtWidgetsApplication11.h" QtWidgetsApplication11 C:\Users\Nicolas\Source\Repos\QtWidgetsApplication3\QtWidgetsApplication11\QtWidgetsApplication11.h 4

      Minimal steps to make these warnings disappear :

      1) Build
      2) Right-click on project : rescan solution, or unload reload project


      Well, now I managed to get rid of these initial warnings, lets add some widgets...

      1) Open the ui file
      2) Add a label and a button
      3) Save & close
      4) Wait, then in the corresponding cpp file, type "ui."

      => The new widgets are not listed !
      => If I type by hand the name of the widgets and use them, intellisense errors will be displayed...

      Minimal steps to make them appear :

      1) Build
      2) Right-click on project : rescan solution, or unload reload project


      Add a new widget class (with it ui) : same problem as (1) : the ui_newwidget.h is not detected


      Intellisense displays not less than 175 warnings about Qt headers (with a freshly created project).
      It would be useful to disable these warnings by default at project creation (ex C26812, C26498), and to fix the one that are important for most software projects.


      Please note that, while it is annoying but doable for very small projects, it can't be done in real life projects with millions of line of code where "rescan solution" can take minutes.

      I'd like my company to migrate to Qt, but if the tooling works too badly on Windows (Qt integration in Visual Studio, QtCreator not having an MSVC compatible profiler, etc.), I don't think that we will be able to make the step.


        1. qt-intellisense1.PNG
          10 kB
        2. qt-intellisense2.PNG
          8 kB
        3. qt-warnings.txt
          33 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            mecfc Miguel Costa
            kiruahxh kiruahxh
            1 Vote for this issue
            3 Start watching this issue



                Gerrit Reviews

                There are no open Gerrit changes