Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt3DWindow open a terminal window
QtWS25 Last Chance

Qt3DWindow open a terminal window

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 1.2k 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.
  • O Offline
    O Offline
    ofmrew
    wrote on last edited by
    #1

    I copied the simple-cpp example code for the torus into a QtCreator console application. When I start the application the torus show, but there is also a terminal window opened with the message; "QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined
    Press <RETURN> to close this window..."
    That window did not appear when the example was run. How do I prevent it from opening?

    By the way, thanks to those that helped me track down the Kit problem.

    aha_1980A 1 Reply Last reply
    0
    • O ofmrew

      I copied the simple-cpp example code for the torus into a QtCreator console application. When I start the application the torus show, but there is also a terminal window opened with the message; "QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined
      Press <RETURN> to close this window..."
      That window did not appear when the example was run. How do I prevent it from opening?

      By the way, thanks to those that helped me track down the Kit problem.

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @ofmrew Please look in your projects .pro file.

      Do you have a CONFIG += console line? (There may be more words after += but console is relevant). Try removing the word console, if it's the only word remove the whole line. Save the file, wait 5 seconds, run qmake, and build the project again.

      Qt has to stay free or it will die.

      O 1 Reply Last reply
      1
      • aha_1980A aha_1980

        @ofmrew Please look in your projects .pro file.

        Do you have a CONFIG += console line? (There may be more words after += but console is relevant). Try removing the word console, if it's the only word remove the whole line. Save the file, wait 5 seconds, run qmake, and build the project again.

        O Offline
        O Offline
        ofmrew
        wrote on last edited by
        #3

        @aha_1980 Same problem. This is my .pro file:

        QT -= gui

        CONFIG += c++11
        CONFIG -= app_bundle

        The following define makes your compiler emit warnings if you use

        any feature of Qt which as been marked deprecated (the exact warnings

        depend on your compiler). Please consult the documentation of the

        deprecated API in order to know how to port your code away from it.

        DEFINES += QT_DEPRECATED_WARNINGS

        You can also make your code fail to compile if you use deprecated APIs.

        In order to do so, uncomment the following line.

        You can also select to disable deprecated APIs only up to a certain version of Qt.

        #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

        QT += 3dcore 3drender 3dinput 3dextras 3dlogic
        SOURCES += main.cpp

        aha_1980A 1 Reply Last reply
        0
        • O ofmrew

          @aha_1980 Same problem. This is my .pro file:

          QT -= gui

          CONFIG += c++11
          CONFIG -= app_bundle

          The following define makes your compiler emit warnings if you use

          any feature of Qt which as been marked deprecated (the exact warnings

          depend on your compiler). Please consult the documentation of the

          deprecated API in order to know how to port your code away from it.

          DEFINES += QT_DEPRECATED_WARNINGS

          You can also make your code fail to compile if you use deprecated APIs.

          In order to do so, uncomment the following line.

          You can also select to disable deprecated APIs only up to a certain version of Qt.

          #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

          QT += 3dcore 3drender 3dinput 3dextras 3dlogic
          SOURCES += main.cpp

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @ofmrew Please try deleting the build folder and rebuild the program.

          Also check if the "Run in Terminal" option is checked in Projects -> Build & Run -> Run.

          Qt has to stay free or it will die.

          O 1 Reply Last reply
          1
          • aha_1980A aha_1980

            @ofmrew Please try deleting the build folder and rebuild the program.

            Also check if the "Run in Terminal" option is checked in Projects -> Build & Run -> Run.

            O Offline
            O Offline
            ofmrew
            wrote on last edited by
            #5

            @aha_1980 Thanks, that did it, I feel like a dummy because I tell others to delete the build folder and I forgot to it myself.

            1 Reply Last reply
            1

            • Login

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