Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Modifying Androïd icon

Modifying Androïd icon

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 519 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.
  • M Offline
    M Offline
    Morgatte
    wrote on last edited by Morgatte
    #1

    Hi,

    I would like including another Icon instead of the basic Androïd Icon. In 3 days I do not succes yet.
    Does someone know how to do ?
    I tried to modify some files but that don't work.

    My work directory and files are thoses ones :
    C:\Users\Morgatte\Desktop_prog\test2

    • CMakeLists.txt
    • main.cpp
    • mainwindow.cpp
    • mainwindow.h
    • customwidget.cpp
    • customwidget.h
    • dragzone.cpp
    • dragzone.h
    • icon.png

    My CMakeLists.txt file contains that lines :

    set(PROJECT_SOURCES
            main.cpp
            mainwindow.cpp
            mainwindow.h
            mainwindow.ui
    )
    
    if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
        qt_add_executable(test2
            MANUAL_FINALIZATION
            ${PROJECT_SOURCES}
            customwidget.cpp customwidget.h
            dragzone.cpp dragzone.h
            icon.png
    
    
    
        )
    
    
    
    
    
    # Define target properties for Android with Qt 6 as:
    #    set_property(TARGET test2 APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
    #                 ${CMAKE_CURRENT_SOURCE_DIR}/android)
    # For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
    else()
        if(ANDROID)
            add_library(test2 SHARED
                ${PROJECT_SOURCES}
                icon.png
            )
    
            qt_android_create_apk(
                ICON "icon.png"  # Chemin vers votre icône
            )
    
            project(test2)
    
    # Define properties for Android with Qt 5 after find_package() calls as:
    #    set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
        else()
            add_executable(test2
                ${PROJECT_SOURCES}
    
            )
        endif()
    endif()
    
    
    1 Reply Last reply
    0
    • P Offline
      P Offline
      Patar
      wrote on last edited by
      #2

      Actually you can change it in APK build, like this https://youtu.be/VaaWibCSnHM

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Morgatte
        wrote on last edited by
        #3

        Hi,

        I seen your Youtube video, but that don't work for me.
        I think I have another problem that's make this one failed.

        Thank's for the video. It will be helpful for others.

        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