Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Errors in MVS 2019 when using Qt extension for the first time

Errors in MVS 2019 when using Qt extension for the first time

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 538 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AllZeros
    wrote on 10 Jun 2021, 16:35 last edited by
    #1

    Hello,

    I am new to Qt programming. I installed Qt 6.1 on my laptop. Moreover, I also installed Qt extension in Microsoft Visual Studio 2019 so that I can write Qt programs. After creating basic Qt Widget Application in MVS 2019, a number of errors have cropped up. For example,

    E1696 cannot open source file "QtWidgets/QApplication"
    E1696 cannot open source file "QtCore/QVariant"
    .
    .
    .
    and so on.

    There are a total of 74 errors. I have specified the path for Qt 6.1 in the Qt options, i.e., Tools --> Options --> Qt --> Versions. I assume the path is ...\Qt\6.1.1\msvc2019_64. But still the errors persist. I am attaching the screenshot of the Visual Studio 2019 setting in this for clarity.

    Kindly, help me regarding this issue.

    Regards.

    Qt_errors.jpg

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 10 Jun 2021, 18:57 last edited by Chris Kawa 6 Oct 2021, 18:58
      #2

      Hi, welcome to the forum.

      You've used a basic console application wizard to create the app. This means it's not set up to use Qt. It's missing include paths, libraries linked, moc and other Qt tools set up for use etc.

      You can set these up manually in this project, but if you're just starting I would suggest to go back to the project creation screen and use one of the Qt application wizards (those are installed with the extension). Just select "Qt" in the project type filter box and use "Qt Widgets Application" wizard. This will create a new basic project with all the Qt related project settings already set up.

      1 Reply Last reply
      3

      1/2

      10 Jun 2021, 16:35

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved