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. Qt5 strange QIcon behaviour
Forum Updated to NodeBB v4.3 + New Features

Qt5 strange QIcon behaviour

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.4k 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.
  • _ Offline
    _ Offline
    _DarkAngel_
    wrote on last edited by
    #1

    I'm developing a set of libraries, implementing some common features (like settings dialogs, etc). There's a method, setThemedIconsEnabled, which, well, sets whether to use icons from the system (default) theme, or to search for appropriate icons in some special folders.
    Now, the issue: when themed icons are used, everything is fine, but if I try to use some custom icons, very strange things happen. For example, I click an action in a toolbar, which should add a new document - everything is OK. Then, I click another action, which should execute some dialog - the application crashes. Note, that everything is fine if themed icons are used, so the problem is not caused by the dialog related code. I'm having this issue when using .svgz icons only (the icons are displayed correctly, by the way).
    One more example. When I use .png icons, I'm able to call the dialog, but if I try to open some menu after executing the dialog, the application crashes again. Opening menus before calling the dialog works perfect. And it's not as funny as it may seem to be. Note, that the menus code and the dialog code are absolutely not related.
    I'm having those issues on Linux only (Ubuntu 12.04 32 bit). On Windows XP everything works fine. No crashes either with .png or .svgz icons. So, it seems to me, that it is a Qt bug.
    There are no debug messages, the application just crashes silently. Maybe the Valgring output will be useful:
    !http://rghost.ru/43060944/image.png(valgrind output)!

    1 Reply Last reply
    0
    • _ Offline
      _ Offline
      _DarkAngel_
      wrote on last edited by
      #2

      I've added some missing .png icons (two, to be exact). Now the problem looks like this: everything is OK if I use themed icons or custom .png icons, but the app crashes if I use .svgz icons. (In the second exampe above, the crash definitely was caused by an .svgz icon in the menu)
      So, the problem comes from SVG support module, i think. Any ideas how to fix that?

      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