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. Problems with using resources with Visual Studio (Qt addin installed)
Forum Updated to NodeBB v4.3 + New Features

Problems with using resources with Visual Studio (Qt addin installed)

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 1 Posters 515 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.
  • P Offline
    P Offline
    panch
    wrote on last edited by
    #1

    Icons and resources work with QT Creator 5.8.0 but not Visual Studio 2015 (with qt addin).
    For example, loading a QIcon :
    QIcon(":/res/icons/icongreen.png");

    Works in Qt Creator, but not in Visual Studio? The resources are added to the project as usual, and it worked at some point, but has now stopped working. Any hints?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      panch
      wrote on last edited by
      #2

      The funny thing is, that I have a similar Qt project compiled under VS2015. Here the icons work!? There is no difference on the qrc file, and the way the icons are loaded. How can this be?

      1 Reply Last reply
      0
      • P Offline
        P Offline
        panch
        wrote on last edited by panch
        #3

        Ok, so I guess I found the solution, but cannot explain how it worked before :O

        The qt binaries were not put next to the executable in the build folder, which suddenly gave runtime errors, because it couldn't find the executables. I cannot explain how it worked before, but as I put the qt dll's next to the executable it worked.

        I know, not the best of explanations, but a good advice would be to always have the binaries next to the executable.

        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