XCode4 - Change the icon of the program - xcode4

I have written a program on XCode4, how can I change the icon of the program?
Refer to the screen capture below:
Also, what is the size for the icon?
Thanks

You put icon file into Resources folder, and then open .plist file (also in resouces folder). Set icon file name in properties list.

Related

Icon doesn't display in qt designer made dialog for QGIS

this is my first QT designer project, and I haven't found an answer for my problem, I designed a dialog for QGIS, I included an icon, with the label display widget, set it up from the resource file, but it won't show in QGIS, at first it didn't even recognized the font and font size I set up in QT, but changing the style Sheet directly in the object inspector fixed that, now I just can't make the icons appear in QGIS, I tried .png and .ico and minimal size, I tried editing the .qrc and .ui file, but nothing works, do I need a python script for that?, what am I missing??
When I preview the dialog in QT it shows ok, and the deafult icons appear in QGIS
I am using QGIS 2.18 and QT designer 4.8.5
Thanks
After you have replaced the icon file you need to recompile with the command make

intellij Idea - How to open .css file(like application.css)?

In eclipse IDE a css file named applicaion.css is opened automatically when any javafx project is opened . But in intellij idea the css file is not created automatically .
Simply right click on the package in which you would like the CSS file in and select New -> File then name it application.css or whatever name with .css
You then add it to the applications style sheets by:
layout.getStylesheets().add(getClass().getResource("/path/to/application.css")).toExternalForm();
Right click on the sample folder and select New -> File.
Save the file as "name_of_your_choice.css". This is how you create a css file in javafx
You can then add the css file to your application by pasting this in your "Main.java"
scene.getStylesheets().add(getClass().getResource("name_of_the_css_file.css").toExternalForm());

Qt Creator open ui.qml file in editor by default

In Qt creator whenever you open a ui.qml file by double clicking or CTRL + TAB the file normally opens in design mode. To see the code, you need to hit ESC to go the text editor. I want that the ui.qml files should open by default in the editor. How can I do that in settings?
In Qt Creator:
Tools >>> Options;
Open Environment;
Go to MIME Types;
Find (by filter, for ex.) application/x-qt.ui+qml;
Delete or change Pattern field in Details.
If you want to edit .ui.qml files by hand, don't use .ui.qml files?
These are made to be edited by the designer and are limited to a small subset of QML because of that.
Just use the normal .qml extension in this case.
More info on QML UI files here.

Customise QPushButton with an image

I am using Qt5 and having some problems in setting the back ground image of a QPushButton. I am using Qt Creator and Design to drag and drop the QPushButton. After that I created a source folder and placed an image in that directory and I googled and tried doing
ui->pushButton_play->setStyleSheet(QString::fromUtf8("background-image: url(:/source/play.png);"));
but no success...am I creating the folder in a wrong place?..I created in D:\Qt5_PROJECT_NAME\source or will I make the url(:\\source\\play.png). Nothing is working...please help...
Did you add the images file into .qrc file? A URL start with : has indicated that It will be searched in .qrc file. If .qrc file didn't used, URL should not start with :. Maybe you should access the image file as
ui->pushButton_play->setStyleSheet(QString::fromUtf8("background-image: url(source/play.png);"));
This is The Qt Resource System documentation.

Is it possible to set a custom preview icon for a file using AIR?

I have a custom file type that I'm reading from and writing to within an AIR application. The file type is XML based but contains encoded data for an image. I've already defined the file type in my application manifest file using the tag which assigns a custom icon to the file.
What I'm trying to figure out is whether it's possible to set the icon for each individual file to be a preview of the image contained within.
there is nothing in the AIR sdk that will do this. it's up the operating system of your file to handle the file icons. i mean, you might be able to assign dynamically generated icons to that file, but you would have to create the icon, write it to your applicationStorageDirectory (ideally) and let your app assign the icon from there, assuming you could find a good way to dynamically change your app.xml file to point to your new icon file, which i don't believe is possible.
however, if your operating system can change your file icon, you can call native process on the file to handle the change this way.
for example, under Mac OS X, you can both automatically create and assign a new icon for an image file of the image contained in the file by writing the following command in Terminal:
$ sips -i FILE_NAME
therefore, if you deploy and AIR application for Mac OS X with a native installer, you can call that command on an image file using a Native Process.

Resources