Qt application doesn't load qsvg.dll - windows

I'm trying using svg images in my Qt(5.6.3) app (on Windows 10). But it's so weird that my qt app doesn't even load qsvg(d).dll while other dlls in imageformats(qtiff(d).dll, qico(d).dll, qjpeg(d).dll, etc.) were already loaded correctly after started...
I was using svg image as image/border-image/background-image in .ui file through QStyleSheet property.
Do I need extra configurations in Visual Studio projects or qt.conf?
Does anyone can help? I'm kinda desperate.

I found a solution. I need to include some header files in QtSvg(I used qtsvgglobal.h, and qsvgwidget.h has been verified working) to make the binary load qtsvg.dll even I didn't code any svg related lines. .ui file won't tell qt maker 'I need svg capabilities'.

Related

How to load images (jpg) in QML generated at runtime

my question is quite simple.
I have a Qt application with a Gui developed with QML.
My back-end side generates and saves jpg images in a folder called /images .
I am able to send from C++ to QML the strings holding the name of the images that I want to show. Sadly my QML Image object doesn't display anything.
It seems that if an image can be displayed only if it has been previously declared in the qml.qrc file.
Sadly, again, qrc files do not support wildcards yet!
https://bugreports.qt.io/browse/QTBUG-1400
Is there a workaround?
The name of the images are not fixed, they are generated with certain runtime values i.e. timestamp.
Thank you
By default it will search the image source in the qrc file. To make it go to the actual file system, prepend a file:/// to the path.

TypeScript source maps in Firefox console?

Is it possible to see TypeScript source maps in console?
I'm using Firefox Developer Edition and the Console is showing the .js line-numbers. I have a single .js file, compiled from multiple TypeScript files.
Chrome and Safari are showing the TypeScript sources correctly.
I have been trying to deal with this problem. I found an answer that works for me and have detailed it in an answer here Firefox isnt showing typescript ts source maps in the debugger
Your problem looks similar. Fundamentally it seems because FF does not handle relative paths to the .map files which are specified in your compiled javascript.

Image Transparency not working

I am using Windows 8 RTM and Visual Studio Express 2012 for Windows Desktop. I am trying to write an application that uses UIRibbon in Visual C++. (Because I have the Express version only, I don't have access to MFC; please don't use it in your answer.)
The problem has to do with the icons I use in the ribbon. Because Windows 7 compatibility is a requirement for this project, I cannot use PNG images; I am stuck with old-school BMPs. The problem is that, while some of the BMPs are displaying correctly, most of the images have black bounding-boxes around them. I suspect the problem has to do with the BMP files, and is not in the ribbon XML file or in the code.
The BMP that displays correctly I downloaded off the Internet as part of a sample that I adapted. The BMPs that don't display correctly I extracted from an ICO file, then converted to a 32-bit image using the System.Drawing.Bitmap .NET API. (This conversion process is in done in a separate program as part of my build procedure, not at runtime.)
My question is: Does changing the bit depth of a BMP in this manner affect the colors in the image? And, if so, can anyone point out a free tool that can turn a PNG file into a 32-bit BMP file that works correctly in the Windows UIRibbon?
Do you speak of the Windows Ribbon Framework here? If so, you wouldn't be able to use PNGs anyway as the framework supports BMP only for Windows 7. With Windows 8 you can also use PNGs. See the regarding MSDN article for more information.
For a free tool which converts your PNGs into compatible BMP files, you should have a look at the visual designer that comes with the "Windows Ribbon Framework for Delphi".
You can simply load you XML markup into the editor and add your pictures. The editor will then convert the added files into BMPs if required. You can also use the editor to check if your Ribbon definition looks right. It produces valid "Windows Ribbon Framework" XML markup, so you can use the markup file in any other language such as C++, C# or Delphi for your further application development.

Phonegap on WP7 does not load images

I'm starting my first PhoneGap project and am developing using Visual Studio and Windows Phone 7, although I intend on ultimately deploying to iOS and Symbian as well.
However, I'm stuck at Step 1. I have added an image to the www/images folder, and put the following code:
<img src="images/login-btn.png" width="103" height="42" style="margin-left:90px;" />
And I get:
It works fine when I preview it in IE9, but I don't have a Mac to test it on iOS yet.
It's worth noting that the JS files and CSS have loaded fine, it's just any image (whether referenced in CSS or an <img> tag) always comes up broken.
My guess would be the Build Action of your image file is incorrect.
According to http://wiki.phonegap.com/w/page/48672055/Getting%20Started%20with%20PhoneGap%20Windows%20Phone%207#4Reviewtheprojectstructure section 4. You should be setting the Build Action of your images etc to Content which simply copies them into the output project when it is built. They are probably currently set to Resource or None.
To change the Build Action right click a file and choose properties to go to the properties window if you do not already have it open. It is probably then the first property. Just click and choose the correct one.
I'm posting this to questions that I found while trying to find my answer to the same problem. The JS framework I use adds a url query to each image when in a debugging mode (in order to force browsers to reload image, instead of using cached). So, my image "image/background.jpg" would be accessed as "image/background.jpg?d=34342233". But, when running on PhoneGAP for Windows Phone, it won't recognize the image, and thus it shows up as broken. So, I had to turn off debugging for the framework I use, and suddenly the images showed up (still, don't forget to set the Build Action to "Content" as mentioned earlier).

Embed image in code with Visual Studio

I remember reading once that there was a way to embed an image into a code file (e.g. a screenshot or diagram) in Visual Studio, but now I can't find any reference to that feature.
Is this possible to do, or am I imagining things?
EDIT: I don't mean embed the image in the executable, for use at runtime. I mean link or embed it literally in the code, for use by developers.
There is a plug-in for VS 2010 that can do this:
Plug-in
There is also a plugin for VS2012 and VS2013. At this moment installing for VS2013 does not seem to work for me though.
ImageComments extension on GitHub
You can embed images in your binary through the use of the ImageList control, which is typically used to store small icons for list controls, gridviews, etc., but could also be used for storing really any image for any purpose. A better solution would be to include a resource file and store your images there.

Resources