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. Setting application icon
Forum Updated to NodeBB v4.3 + New Features

Setting application icon

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

    How are you everyone ,I have been try to set icon for my application by following what is the qt documentation but am having the error what can the problem and its solution ?below is my code and the error.

    QT       += core gui
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    CONFIG += c++11
    
    # 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 += \
        main.cpp \
        mainwindow.cpp
    
    HEADERS += \
        mainwindow.h
    
    FORMS += \
        mainwindow.ui
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    
    RESOURCES += \
        RISOSI.qrc
    
    RC_ICONS = school(1)(1).ico
    
    

    (ef648682-45c1-40f8-953c-e6e031b2a353-image.png image url)

    JonBJ 1 Reply Last reply
    0
    • GREYONG GREYON

      How are you everyone ,I have been try to set icon for my application by following what is the qt documentation but am having the error what can the problem and its solution ?below is my code and the error.

      QT       += core gui
      
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      
      CONFIG += c++11
      
      # 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 += \
          main.cpp \
          mainwindow.cpp
      
      HEADERS += \
          mainwindow.h
      
      FORMS += \
          mainwindow.ui
      
      # Default rules for deployment.
      qnx: target.path = /tmp/$${TARGET}/bin
      else: unix:!android: target.path = /opt/$${TARGET}/bin
      !isEmpty(target.path): INSTALLS += target
      
      
      RESOURCES += \
          RISOSI.qrc
      
      RC_ICONS = school(1)(1).ico
      
      

      (ef648682-45c1-40f8-953c-e6e031b2a353-image.png image url)

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by
      #2

      @GREYON
      Hi. I don't think what you show in the .pro file will tell us/you what the issue is. (Except that [to me] school(1)(1).ico is a rather odd name with the parentheses in it, but that may not be relevant.)

      If that message with a filename followed by Error 1 is make reporting the Linux errno upon trying to access (presumably write to) debug/APPCON_resource_res.o, that would be an EPERM "Operation not permitted" error. If that file exists, are you able to overwrite/delete it? If it does not exist, are you able to create it (e.g. with touch)? Try deleting all the files in debug/ are rebuild from scratch?

      GREYONG 1 Reply Last reply
      1
      • JonBJ JonB

        @GREYON
        Hi. I don't think what you show in the .pro file will tell us/you what the issue is. (Except that [to me] school(1)(1).ico is a rather odd name with the parentheses in it, but that may not be relevant.)

        If that message with a filename followed by Error 1 is make reporting the Linux errno upon trying to access (presumably write to) debug/APPCON_resource_res.o, that would be an EPERM "Operation not permitted" error. If that file exists, are you able to overwrite/delete it? If it does not exist, are you able to create it (e.g. with touch)? Try deleting all the files in debug/ are rebuild from scratch?

        GREYONG Offline
        GREYONG Offline
        GREYON
        wrote on last edited by
        #3

        @JonB thanks for replying, sorry am not very clear,which file can I delete and create from scratch?Do you mean the whole project or a**.ico** file?

        JonBJ 1 Reply Last reply
        0
        • GREYONG GREYON

          @JonB thanks for replying, sorry am not very clear,which file can I delete and create from scratch?Do you mean the whole project or a**.ico** file?

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #4

          @GREYON
          ? The file in the error message and that I quoted to you, I cannot see how it could be any clearer....

          GREYONG 1 Reply Last reply
          0
          • JonBJ JonB

            @GREYON
            ? The file in the error message and that I quoted to you, I cannot see how it could be any clearer....

            GREYONG Offline
            GREYONG Offline
            GREYON
            wrote on last edited by
            #5

            @JonB thanks ,the problem was the icon file name,it has worked now thanks for your help

            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