Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. Warning: This file is not part of any project
QtWS25 Last Chance

Warning: This file is not part of any project

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
7 Posts 4 Posters 1.9k 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
    sschmitz98
    wrote on last edited by
    #1

    I was working on a simple project that was using both Desktop 5.15 and WebAssembly of the same version. Both were working and compiling, but after spending some time in Desktop, I switched back to WebAssembly and it no longer compiles.
    For some reason WebAssembly no longer imports any file from the project at all. I have tried making new WebAssembly projects, uninstalling and reinstalling both Qt and emsdk. I have changed versions for both, but its always the same result. Any file I open while in WebAssembly says "Warning: this file is not part of any project. The code model might have issues parsing this file properly" and the top include statement says 'file not found'. I can switch back to and run Desktop just fine, but not WebAssembly
    c5881ab0-4703-4aff-b195-ebfa839d8ea1-image.png
    Any help is greatly appreciated

    jsulmJ 1 Reply Last reply
    0
    • S sschmitz98

      I was working on a simple project that was using both Desktop 5.15 and WebAssembly of the same version. Both were working and compiling, but after spending some time in Desktop, I switched back to WebAssembly and it no longer compiles.
      For some reason WebAssembly no longer imports any file from the project at all. I have tried making new WebAssembly projects, uninstalling and reinstalling both Qt and emsdk. I have changed versions for both, but its always the same result. Any file I open while in WebAssembly says "Warning: this file is not part of any project. The code model might have issues parsing this file properly" and the top include statement says 'file not found'. I can switch back to and run Desktop just fine, but not WebAssembly
      c5881ab0-4703-4aff-b195-ebfa839d8ea1-image.png
      Any help is greatly appreciated

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @sschmitz98 Please post your pro file

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sschmitz98
        wrote on last edited by
        #3
        QT += quick virtualkeyboard core network
        
        # You can make your code fail to compile if it uses deprecated APIs.
        # In order to do so, uncomment the following line.
        #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
        
        SOURCES += \
                conference.cpp \
                main.cpp \
                matchup.cpp \
                team.cpp
        
        RESOURCES += qml.qrc
        
        # Additional import path used to resolve QML modules in Qt Creator's code model
        QML_IMPORT_PATH =
        
        # Additional import path used to resolve QML modules just for Qt Quick Designer
        QML_DESIGNER_IMPORT_PATH =
        
        QT_PLUGIN_PATH=`pwd`/plugins
        
        # Default rules for deployment.
        qnx: target.path = /tmp/$${TARGET}/bin
        else: unix:!android: target.path = /opt/$${TARGET}/bin
        !isEmpty(target.path): INSTALLS += target
        
        HEADERS += \
            conference.h \
            matchup.h \
            team.h
        
        CONFIG += c++11
        
        1 Reply Last reply
        0
        • J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          well, QGuiApplication requires QT += gui which is missing from your pro file.


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          S 1 Reply Last reply
          2
          • J.HilkJ J.Hilk

            well, QGuiApplication requires QT += gui which is missing from your pro file.

            S Offline
            S Offline
            sschmitz98
            wrote on last edited by sschmitz98
            #5

            @J-Hilk Apologies, I forgot I had an older branch checked out, this is my current .pro

            QT += quick core network widgets qml gui
            
            # You can make your code fail to compile if it uses deprecated APIs.
            # In order to do so, uncomment the following line.
            #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
            
            SOURCES += \
                    conference.cpp \
                    main.cpp \
                    matchup.cpp \
                    team.cpp
            
            RESOURCES += qml.qrc
            
            # Additional import path used to resolve QML modules in Qt Creator's code model
            QML_IMPORT_PATH =
            
            # Additional import path used to resolve QML modules just for Qt Quick Designer
            QML_DESIGNER_IMPORT_PATH =
            
            QT_PLUGIN_PATH=`pwd`/plugins
            
            # Default rules for deployment.
            qnx: target.path = /tmp/$${TARGET}/bin
            else: unix:!android: target.path = /opt/$${TARGET}/bin
            !isEmpty(target.path): INSTALLS += target
            
            HEADERS += \
                conference.h \
                matchup.h \
                team.h
            
            CONFIG += c++11
            
            #QMAKE_LFLAGS+= "-s TOTAL_MEMORY=67108864"
            
            

            I'm still receiving that error, and its not specifically QGuiApplication, it is whatever my top most include statement is
            cb8bf7cb-9295-4190-9e3a-0c8d7d6b19e4-image.png

            af5fe901-ca4e-43a7-bf09-5c5acde8590f-image.png

            And so none of my Q elements will work correctly
            c1df05d1-c285-4d66-aa26-7bffdbbbfc3f-image.png

            But if I switch to Desktop 5.15 (or other Desktop versions but not Web Assembly) the errors go awayb5d99354-6e7d-4478-af29-322225c1b644-image.png

            I assume I'm missing something simple with my .pro, but I can't figure out what that would be

            1 Reply Last reply
            0
            • JoeCFDJ Offline
              JoeCFDJ Offline
              JoeCFD
              wrote on last edited by JoeCFD
              #6

              add the following two lines in the pro file
              INCLUDEPATH += $$PWD
              DEPENDPATH += $$PWD

              S 1 Reply Last reply
              0
              • JoeCFDJ JoeCFD

                add the following two lines in the pro file
                INCLUDEPATH += $$PWD
                DEPENDPATH += $$PWD

                S Offline
                S Offline
                sschmitz98
                wrote on last edited by
                #7

                @JoeCFD said in Warning: This file is not part of any project:

                INCLUDEPATH += $$PWD
                DEPENDPATH += $$PWD

                That didn't seem to work :/
                I'll also note the issues that are coming up in QtCreator
                44826be9-71fb-4081-adb9-3448a549f11c-image.png
                My Emscripten version is 3.1.6, it just doesn't seem to recognize the version number
                fa284d6c-cfe6-4996-a07c-e655a0a8d6dd-image.png
                and I've tried with 3.0.0 and 1.39.7 with WebAssembly 5.15.2. This project is currently 6.3.2 but I can't get any WebAssembly to work

                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