How to add icons to QMenu in Qt Creator? - qt-creator

I have several *.png icon files like new.png, open.png etc. I added these icons to my main menu in the QtCreator as following:
Click on corresponding QAction in desgin mode
In that actions property window --> QAction --> icon --> Select file...
Select e.g. new.png
Enter
Now, I can see that icon next to the newAction QAction object in the Qt creator design mode as here
The visible and iconVisibleInMenu is both checked in the properties window!
But, when I build that project and run my application, the icon is not there?? Why or what am I missing?

Ok
1. I have to add a resource file via right click -> add.. -> Qt -> Resource file
2. Click on that new resource file and add folder with the icons.
Now, you are also able to select a resource in your whole code.

Related

MacOS + Visual Studio Code: add a folder to a workspace by path

I'm trying to inspect the code in a module found in a subfolder of /usr/local/lib/python3.9/site-packages/*.
The trouble is that Visual Studio Code only gives me the system finder view, to navigate to the folder, and I'm not quite sure how to get to the root to even find /usr.
typing the path in the search bar doesn't help
navigating to Macintosh HD and or Volumes still doesn't show me /usr or other common Linux folders located on the root filesystem.
This method should work in any app that uses the standard file dialogs:
In the Finder open a new window
Type Command-Shift-G or select Go to Folder… from the Finder’s Go menu
Enter your path, e.g. /usr/local/lib/python3.9/site-packages
You now have a Finder window showing the (parent) folder of where you want to explore
In VSCode type Command+O or select Open… from the File menu
A standard file dialog will open
Click on a folder icon in your Finder window, this can be an icon in the window itself or the one in the window’s title bar, and drag and drop it onto the standard file dialog.
The dialog will switch to show the dropped folder
Continue navigating as usual

Changing the name of my app?

How do I change the name of my app within Xcode 6, so that it will change the name of all of my files properly?
select your target under "Targets" in the project editor, then choose View > Utilities > Show File Inspector. Xcode opens the File inspector, which includes the Identity and Type pane. Enter your application's new name in the Project Name field then hit the return key on your keyboard.
Xcode displays a project-rename dialog that contains all the items that can be renamed in your project. Leave your application selected in the dialog and deselect all other items then click Rename to perform the rename operation.
Hope this helps

Xcode 4 file complete path

If I have any file open in Xcode and I would like to know the complete path to the file, how do I do that in Xcode 4? In Xcode 3 I could hover over the file name and get a tooltip with the complete path. I could also right-click a file name at the very top and get a pop-up window with the complete path. This is all gone in Xcode 4.
The annoyance is that when using the Xcode 4 search, it doesn't even show the complete path of the file in the results?!
The only solution I have currently found is to open the save as dialog and get the path from there! That definitely can't be the solution. What am I missing?
For files that are not part of the project you can use the File menu's Show in Finder option.
Update: Xcode 4.2 restored the ability to right-click or command-click on the file's name in the title bar to get a drop-down with the full path.
Show the file inspector utility (normally at the right hand side of the main window on my setup , to do that click the rightmost button of the "View" buttons menu). Click on your file in the navigator and the inspector will refresh with the information. Full path is disclosed and there is a button to open a new Finder window with the enclosing folder.

Xcode 4 : how to have the folder name of each opened project displayed in the Window menu?

In Xcode 3.x, it was very practical, when you have several Xcode project opened in parallel, to know what is the folder of each project. This info was given in the list of the opened project in the "Window" menu.
It was very useful as it allows to find easily a defined version of a project when you work on several versions in parallel.
How to have the name of the project folders associated to each project displayed in the "Window" menu ?
Is there an option somewhere ?
Thanks a lot.
You could Command-click the file icon next to the title in the window's title bar. This shows the path to the file (in this case the project or workspace file) in any Cocoa app. You can even click one of the entries in the popup menu to open that folder in Finder.

setup file for window application

I created a setup file. It is working fine, but I want an image for my setup. When I installed the setup in any system I want some images on my setup. Help me, thank u.
I will tell you how to do it in Visual Studio. To change the setup.exe icon you can do the following:
Build your setup project
Open the setup.exe file use just build, File -> Open -> File
Right click the Icon node in the file explorer window and choose the Add Resource
Import the icon your want in the popup dialog, and make sure the ID of the icon is the smallest one.

Resources