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. Differences between 6.2 and 6.5. Where to reed about it?
Forum Updated to NodeBB v4.3 + New Features

Differences between 6.2 and 6.5. Where to reed about it?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 401 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.
  • B Offline
    B Offline
    bogong
    wrote on last edited by bogong
    #1

    Hello all!

    Just got installed Qt 6.5.0 and running default application from Qt Creator wizard. There are few changes in default application. Could someone say why it is:

    1. In default application CMakeLists.txt:
    cmake_minimum_required(VERSION 3.16)
    
    project(AmneziaMobile VERSION 0.1 LANGUAGES CXX)
    
    set(CMAKE_CXX_STANDARD_REQUIRED ON)
    
    find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)
    
    qt_standard_project_setup(REQUIRES 6.5)
    
    qt_add_executable(appAmneziaMobile
        main.cpp
    )
    
    qt_add_qml_module(appAmneziaMobile
        URI AmneziaMobile
        VERSION 1.0
        QML_FILES Main.qml
    )
    
    set_target_properties(appAmneziaMobile PROPERTIES
        MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
        MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
        MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
        MACOSX_BUNDLE TRUE
        WIN32_EXECUTABLE TRUE
    )
    
    target_link_libraries(appAmneziaMobile
        PRIVATE Qt6::Quick
    )
    
    install(TARGETS appAmneziaMobile
        BUNDLE DESTINATION .
        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    )
    

    There are few questions:
    -- why added install? In previous version of default application it hasn't been there. Why now?
    -- why added MACOSX_BUNDLE parameters? Before it there were nothing about it.
    -- before it has contained:

    find_package(QT NAMES Qt6 Qt5 COMPONENTS ${A_QT_MODULES} REQUIRED)
    find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ${A_QT_MODULES} REQUIRED)
    
    if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
    	qt_add_executable(${A_NAME_TARGET}
    		${A_SOURCES}
        )
    else()
        if(ANDROID)
    		add_library(${A_NAME_TARGET}
    			SHARED
    				${A_SOURCES}
            )
        else()
    		add_executable(${A_NAME_TARGET}
    			${A_SOURCES}
            )
        endif()
    endif()
    

    and

    target_compile_definitions(${A_NAME_TARGET}
    	PRIVATE
    		$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>
    	PUBLIC
    )
    
    target_link_libraries(${A_NAME_TARGET}
    	PRIVATE
    		${A_QT_MODULE_TARGETS}
    	PUBLIC
    )
    

    What the difference to what is now in Qt CMakeLists.txt? Why all of this code canceled from Default application in wizard?

    1. Is there any real full manuals about new features of qt for the case of iOS/Android development? For now all of documentation is very brief. Especially about iOS.
    W 1 Reply Last reply
    0
    • B bogong

      Hello all!

      Just got installed Qt 6.5.0 and running default application from Qt Creator wizard. There are few changes in default application. Could someone say why it is:

      1. In default application CMakeLists.txt:
      cmake_minimum_required(VERSION 3.16)
      
      project(AmneziaMobile VERSION 0.1 LANGUAGES CXX)
      
      set(CMAKE_CXX_STANDARD_REQUIRED ON)
      
      find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)
      
      qt_standard_project_setup(REQUIRES 6.5)
      
      qt_add_executable(appAmneziaMobile
          main.cpp
      )
      
      qt_add_qml_module(appAmneziaMobile
          URI AmneziaMobile
          VERSION 1.0
          QML_FILES Main.qml
      )
      
      set_target_properties(appAmneziaMobile PROPERTIES
          MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
          MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
          MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
          MACOSX_BUNDLE TRUE
          WIN32_EXECUTABLE TRUE
      )
      
      target_link_libraries(appAmneziaMobile
          PRIVATE Qt6::Quick
      )
      
      install(TARGETS appAmneziaMobile
          BUNDLE DESTINATION .
          LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
          RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
      )
      

      There are few questions:
      -- why added install? In previous version of default application it hasn't been there. Why now?
      -- why added MACOSX_BUNDLE parameters? Before it there were nothing about it.
      -- before it has contained:

      find_package(QT NAMES Qt6 Qt5 COMPONENTS ${A_QT_MODULES} REQUIRED)
      find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ${A_QT_MODULES} REQUIRED)
      
      if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
      	qt_add_executable(${A_NAME_TARGET}
      		${A_SOURCES}
          )
      else()
          if(ANDROID)
      		add_library(${A_NAME_TARGET}
      			SHARED
      				${A_SOURCES}
              )
          else()
      		add_executable(${A_NAME_TARGET}
      			${A_SOURCES}
              )
          endif()
      endif()
      

      and

      target_compile_definitions(${A_NAME_TARGET}
      	PRIVATE
      		$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>
      	PUBLIC
      )
      
      target_link_libraries(${A_NAME_TARGET}
      	PRIVATE
      		${A_QT_MODULE_TARGETS}
      	PUBLIC
      )
      

      What the difference to what is now in Qt CMakeLists.txt? Why all of this code canceled from Default application in wizard?

      1. Is there any real full manuals about new features of qt for the case of iOS/Android development? For now all of documentation is very brief. Especially about iOS.
      W Offline
      W Offline
      wrosecrans
      wrote on last edited by
      #2

      @bogong said in Differences between 6.2 and 6.5. Where to reed about it?:

      -- why added install? In previous version of default application it hasn't been there. Why now?

      Because having it the default template is convenient for a lot of people. It's easy enough to delete if you don't want it.

      -- why added MACOSX_BUNDLE parameters? Before it there were nothing about it.

      Pretty much the same. A lot of people building on MacOS had to add that stuff manually before, so it was more convenient to have it in the default template. IF you aren't building an OSX bundle, it shouldn't effect anything.

      You can read the details in the CMake documentation. It's expected that most people will tinker with the CMakeLists.txt, so you can make it do whatever you want.

      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