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. Same set of files can run in QTCreator but not in VS 2022
Qt 6.11 is out! See what's new in the release blog

Same set of files can run in QTCreator but not in VS 2022

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
1 Posts 1 Posters 330 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.
  • S Offline
    S Offline
    sylvalas
    wrote on last edited by
    #1

    I just had some test files on both platforms. In VS 2022 I get loads of LNK errors.
    and I created the .pro in the VS 2022 using the qt addons. But the .pro and the .pri files are not the same as what is created directly by QTCreator, and it says it cannot find my .ui file. But if I use the template of the .pro created by QTCreator, it works.

    I wonder how you guys use VS to do qt?

    Many thanks,
    Christopher

    The .pro and .pri created by VS are as follow
    pro:

    # ----------------------------------------------------
    # This file is generated by the Qt Visual Studio Tools.
    # ------------------------------------------------------
    
    TEMPLATE = app
    TARGET = Microuija
    DESTDIR = ../x64/Debug
    CONFIG += debug
    LIBS += -L"."
    DEPENDPATH += .
    MOC_DIR += .
    OBJECTS_DIR += debug
    UI_DIR += .
    RCC_DIR += GeneratedFiles
    include(Microuija.pri)
    

    pri:

    # ----------------------------------------------------
    # This file is generated by the Qt Visual Studio Tools.
    # ------------------------------------------------------
    
    # This is a reminder that you are using a generated .pro file.
    # Remove it when you are finished editing this file.
    message("You are running qmake on a generated .pro file. This may not work!")
    
    
    HEADERS += ./MO_Main.h
    SOURCES += ./main.cpp \
        ./MO_Main.cpp
    FORMS += ./MOMain.ui
    
    
    1 Reply Last reply
    0

    • Login

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