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. QIcon can not see icons on another computer
Forum Updated to NodeBB v4.3 + New Features

QIcon can not see icons on another computer

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 1.7k Views 1 Watching
  • 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
    maniek1310
    wrote on last edited by
    #1

    Hi

    I have a problem with the library QIcon. The icons show up but only on my computer, where I have installed QtCreator, and on other computers icons are not displayed. Below I've added a piece of code like assigns an icon to the item QListWidget.

    @ ui->ninite->item(0)->setIcon(QIcon("dane\icon\firefox.ico"));@

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you deploy the icon file has well as the corresponding image format plugin with your application ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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

        If you propagates by imageformats folder to "C: \ Qt \ Tools \ QtCreator \ bin \ plugins \ imageformats" is so

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          That I didn't understand.

          However, since you are copying your software somewhere else, did you go throughout the "Windows deployment":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html documentation ?

          There's also this nice "wiki":http://qt-project.org/wiki/Deploy_an_Application_on_Windows entry

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • M Offline
            M Offline
            MuldeR
            wrote on last edited by
            #5

            Just a suggestion:

            You can use the "Qt Resource System":http://qt-project.org/doc/qt-5/resources.html to have the icon built-in in your program file. Then you can just use QIcon(":/firefox.ico") without having to worry about the icon file being present on the user's machine...

            (You'd still have to deploy the image format plugin's though, if you use dynamic linking. Use static linking to create 100% self-contained EXE file)

            My OpenSource software at: http://muldersoft.com/

            Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

            Go visit the coop: http://youtu.be/Jay...

            1 Reply Last reply
            0
            • M Offline
              M Offline
              maniek1310
              wrote on last edited by
              #6

              @SGaist Thanks, you were right. Just not copied the files what you need :)

              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