Bitmap image are visible in Qt Designer but I can't see them after compiling in QDevelop IDE - qt

In qt-designer I loaded bitmap images and in preview I am able to view the images. But after compiling in qdevelop IDE, I could not see the images at all.
Is there any procedure to load the bitmaps in to qdevelop.
Thanks in advance

I think you'll be wanting to add the bitmaps to a resource file, using Qt's resource system, if you want to be able to use them in Designer and also have them work in your compiled application correctly. I've not used it, but the examples look fairly straightforward, and it appears QDevelop supports the resource system to some extent.

Have you configured Qt to use required images plugins?
[-no-gif] [-qt-gif] [-no-libtiff] [-system-libtiff] [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng] [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg]

Related

How to download an image from url to use in ILLUSTRATOR scripting (ExtendScript Toolkit)

To place an image into Adobe Illustrator using the ExtendScript Toolkit is well documented:
var placedItem = doc.placedItems.add();
placedItem.file = new File("~/Desktop/xxx.jpg");
placedItem.position = [100,370];
Does anyone know how to place an image from URL into Adobe Illustrator. For example: https://www.bcgen.com/demo/IDAutomationStreamingDataMatrix.aspx?D=TEST123&PT=T&MODE=3&X=1&LM=1
In Photoshop one can use app.system(curl -o .....) as explanined here (How to download an image from url to use in Photoshop scripting (ExtendScript Toolkit)). But in Illustrator app.system() seems not to be available. Maybe do.script() is the right way to go but did not figure out how so far....
JSXGetURL is meant to work with any Adobe Creative Cloud application that has ExtendScript support – InDesign, InDesign Server, InCopy, Illustrator, Photoshop…
JSXGetURL is implemented as an ExtendScript DLL/framework, written in C/C++.
This DLL allows you to access URLs (including https: or ftp:) straight from ExtendScript.
There is nothing to install – all you need to do is //#include a .jsx file which then loads the DLL.
See https://coppieters.nz/?p=577
Disclosure: I am the author of JSXGetURL.

Display CHM file in JavaFX app

Is there a way to display Compiled Help manual CHM in a javaFX app, without using java.awt.Desktop from AWT ?
Calling A CHM reader using Runtime.getRuntime().exec(help.chm) is an option, but to make it cross platform, this would require every user in mac, win and linux to have a CHM reader installed.
What's the best option for a cross platform solution ? should I extract it to HTML and display it in javafx.scene.web.WebView ?
Given your wish to be platform independent, I'd advise to go to the HTML route as you yourself suggested. I don't know your reason for converting CHM to HTML if you also control the source, in that case I'd either use HTML directly or markdown to HTML.
You should try this. It's works for me!

How do "theme" icons work in Qt Creator Designer?

When I create the "Command link button" (QCommandLinkButton) it has relatively nice green arrow icon.
I would like to see what other nice icons can I choose. When I try to change the icon, [Theme] appears instead of path or some GUI selection dialog:
I also noticed the context menu:
When I click Set icon from theme, again expecting some GUI selection list, I get just a text field:
What I was imagining:
Where's the list of icons from which the green arrow was taken?
QIcon::fromTheme works under specific conditions.
If it can find it in the QIcon::themeSearchPaths() for the QIcon::themeName()
If the desired icon isn't there, Qt Designer won't be able to do any of the from theme, named icons.
But... if you check your target system for the theme search paths and set the theme name, you are more likely to have success.
Example
On linux, I wanted to get a plus and a minus icon.
I found list-add.png and list-remove.png fit the bill.
https://github.com/GNOME/adwaita-icon-theme/tree/master/Adwaita/16x16/actions
http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
I did a locate on my system and found these:
/usr/share/icons/gnome/16x16/actions/list-add.png
...
/usr/share/icons/gnome/32x32/actions/list-add.png
/usr/share/icons/gnome/scalable/actions/list-add.svg
/usr/share/icons/oxygen/16x16/actions/list-add.png
...
Forcing with fallback icon in QIcon::fromTheme
Find the icon on the filesystem:
ui->toolButton->setIcon(QIcon::fromTheme("list-add",
QIcon("/usr/share/icons/gnome/16x16/actions/list-add.png")));
Find the icon in the qt resource system...
Add the icon in a qrc file in your build, then reference it's path.
ui->toolButton->setIcon(QIcon::fromTheme("list-add",
QIcon(":/list-add.png")));
Overriding the current icon theme
qDebug() << "themeSearchPaths:" << QIcon::themeSearchPaths() << QIcon::themeName();
// themeSearchPaths: ("/usr/local/share/icons", "/usr/share/icons", ":/icons") "hicolor"
The default theme for the system, and for the target deployment machine, likely didn't have the icons in it I wanted... but the gnome or oxygen icon desktop theme installed would almost always have it...
QIcon::setThemeName("oxygen");
Note that you won't see the preview in Qt Designer necessarily because it doesn't set the theme until runtime of your code.
The gnome icon library has 1100+ icons in it. Here is one list:
https://gist.github.com/peteristhegreat/c0ca6e1a57e5d4b9cd0bb1d7b3be1d6a
This works as long as you know what themes are available on the target system.
The list from freedesktop.org has 286 icons listed.
Use icons included in Qt
Just like #peppe pointed out, Qt includes 70 standard icons, too.
widget->setIcon(widget->style()->standardIcon(QStyle::SP_BrowserReload));
http://doc.qt.io/qt-5/qstyle.html#StandardPixmap-enum
Conclusion
Using a stock library on your target system is probably the fastest. Using the Qt built-ins is fast to figure out and use, but is fairly limited. Using a resource file is probably the most robust method, and gives unlimited options on what icon to use.
Be sure to pick a standard icon pack, and think about licensing and attributions, and some other things like that.
And there is no shortage of icons available online:
https://www.quora.com/What-is-the-best-icon-library
https://www.google.com/search?q=open+source+icon+library
Hope that helps.
I don't think that's the function you want to use. The "theme" name there corresponds to the QIcon::fromTheme functionality, which uses icons named according to the FDO specification
http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
And they're not really supported on non-FDO platforms (Windows, Mac, ...) unless you deploy your own theme files.
Now some stock icons are shipped with Qt itself; I don't know how to set them from Designer, but from code you can use QStyle::standardIcon:
widget->setIcon(widget->style()->standardIcon(QStyle::SP_BrowserReload));
If the icon you need is not provided by Qt, you'll need to ship it. In that case the Resource System is a convenient way to bundle it alongside your executable.
Last, but not least, from a UX point of view you should consider using QToolButtons unless you're really building a Vista-like wizard.

Chromium based Browser "slimjet" toolbar grafical resources (icons)

I want to modifiy slimjet for personal use and searched through gits, reshacked all dll files and the app exe but I can't seem to find the resources I want to change. Does anybody know, where the grafical resoucres - icons or buttons for the toolbar - are stored in chromium derivatives general, but especially slimjet? I am not talking about the extension buttons. I mean those for "home" and navigation.
Are they inside the compiled binary file inside the exe or inside the .pak file I can not reshack or unpack?
Any clue or hint or help is appreciated.

How to set icon to an adobe air application

I am developing an Adobe Air app. I need to set an icon to the app so it is shown on the task bar. I added the icon tag to the descriptor file but it is not working and I really don't know why, any ideas?
Two things that might be throwing you off:
1) the icons block is commented out by default in the auto-generated descriptor file, and is an easy thing to overlook
2) the icons specified in a descriptor file don't appear in the app unless you build a release build, and install the resulting .air file. A debug build will only show the AIR icon.
At least these are the behaviors I experience in Flash Builder 4.
Adding the icons to your application descriptor should do it.
However, icons come in different sizes.
For example:
<icon>
<image16x16>/icons/app/icon_16.png</image16x16>
<image29x29>/icons/app/icon_29.png</image29x29>
<image32x32>/icons/app/icon_32.png</image32x32>
<image36x36>/icons/app/icon_36.png</image36x36>
<image48x48>/icons/app/icon_48.png</image48x48>
<image57x57>/icons/app/icon_57.png</image57x57>
<image72x72>/icons/app/icon_72.png</image72x72>
<image114x114>/icons/app/icon_114.png</image114x114>
<image128x128>/icons/app/icon_128.png</image128x128>
<image512x512>/icons/app/icon_512.png</image512x512>
</icon>
If I'm not mistaken, the 32x32 icon should be the one that is displayed in the taskbar.
Obviously, make sure that you are referring to the correct path in your descriptor file.
One more thing. I just wasted over an hour on this: For an iOS app, you won't see the icon when you drop the app into iTunes (at least not under Windows), but it will appear on your device!

Resources