QLineEdit/QLabel won't stay enabled when saving .ui - properties

I have built a .ui-file in Qt Creator that includes a few different stacked containers: a Tool Box that contains QWidgets with QLabels, QLineEdits etc. in various tabs. A few of the widgets are disabled in the beginning and should only be enabled open some other action. To be able to do that by simply calling widget.setEnabled(True) all the items on the widget, that should appear enabled now, must be enabled in QT Creator, is that correct?
My problem is, that a few items on the QWidget do not stay enabled. I can check their properties checkbox for "enabled", but as soon as I navigate to a different tab in the Tool Box and then return to my QWidget, these two items are disabled again. It also doesn't save their status as enabled when I save the file.
What distinguishes the items that do stay enabled from the ones that don't is that for the ones that don't, in the properties editor, the properties "enabled" and "cursor" appear bold, whereas for the others they don't. All other properties appear to be similar and all items are children of the same QWidget.
I tried replacing them with copied versions of another similar item on the same tab, but that doesn't help.

Related

remove items from navigator's context menu

In my eclipse plugin I have specified my custom navigator using the CNF (Common Navigator Framework). I got everything working except the context menu.
I have created a new viewer-extension for it in which I define a popup-Menu with the respective groups (I overtook all of the groups from the project explorer) and it does get displayed and everything I want to appear in it, does appear.
However there are a bunch of things that appear in it that I don't want to appear.
As an example there is the Run As... option in the context menu which I don't want as I have nothing to run anyway. I tried using the Plugin-Menu-Spy in order to find where this menuItem is being contributed but it won't give me any information about it.
I found out that when setting allowsPlatformContributions = false in my popUp-Extension the unwanted menuItems disappear but so do the Import and Export menus which I do want to have.
So how can I remove the Run As... menuItem from my navigator's context menu? Is there some kind of filter I can apply to it?

How to bind keys in dialog?

I'm trying to build wizard dialog based on NewSourceModulePage and NewSourceModuleWizard classes (DLTK).
I don't know how to bind some key to activate textfields and other elements of dialog. In basic SourceModulePage I get two elements: "Source Folder" and "Name".
When I press ALT+d, I can change the source folder, with ALT+o I can the "Browse" button.
How can I obtain this effect for other elements?
Eclipse automatically picks up certain strings and uses these as accelerators. But not on all platforms - e.g. this is not supported on Mac OS X.
You can control the accelerators by including "&" (ampersand) on the strings for tabs in tab-folders and the lead-in labels for controls that can have focus - e.g. Text and Table.

Add NSMenuItems to other Apications' Menus

I use an application called Afloat that adds a few buttons to the "Window" menu of every application that uses windows. It adds the Afloat icon and options like "Keep Afloat" which will leave the active window as the window that stays the furthest forward even if the user clicks a different window. I would like to add an item to the "Edit" menu and to all contextual menus on a text editor. I can't find how to do this in the documentation.
Quote by Apple:
The CFPlugIn provides a standard architecture for application extensions. A contextual menu plug-in, which is CFPlugIn bundle installed in a Library/Contextual Menu Items directory at the appropriate level of the system, enables applications and other forms of software to extend the list of commands found on contextual menus such as the Finder’s.
Alternatively, you can use Services to integrate with other applications.

NSToolbar looks different in Leopard and Snow Leopard

I have a Cocoa app I'm working on and I get a different result in appearance for the NSToolbar I am using for the main window.
Specifically, I'm using a search field as the last NSToolbarItem and, whereas under Snow Leopard it is displayed correctly:
it is cut under Leopard:
Looking at those two versions it appears that the spaces I put between the items are not respected under Leopard. I also saw that sometimes, after I make some update at the toolbar in Interface Builder, these changes are not mirrored in the running application even under Snow. I have to drag the default bar from the customizing menu in order to see them.
UPDATE
The reason for the NSToolbar not always mirroring what is in the .nib file resides in the autosave mechanism that was enabled for me, as NSGod suggested.
What can be the cause of this misbehavior?
Is there something about constraints, (minimum and maximum) sizes that I should have taken into account?
Feel free to point some documentation to me
UPDATE 2
Is there a way to programmatically introduce item and spaces into a NSToolbar or check the consistency (at run time) of those entered with Interface Builder?
While I do recall having a couple of oddities with search fields in NSToolbars, I've never seen the behavior where the right side of it is cut off.
Are the NSToolbarItems that are spaces the fixed one-unit space, or the flexible spaces?
"I also saw that sometimes, after I
make some update at the toolbar in
Interface Builder, these changes are
not mirrored in the running
application even under Snow. I have to
drag the default bar from the
customizing menu in order to see them."
You need to keep in mind that if you've enabled user customization and autosave behavior in the toolbar, then when the user explicitly makes a change, it will be saved to user defaults. If you then re-arrange your toolbar in IB and run the app, it's possible that the configuration saved in user defaults is overriding the default configuration you've specified in the nib file.
What I usually do is during testing, delete the prefs file for my app so changes can't be overridden. (FWIW, I usually use an AppleScript saved as an application that I keep in my Dock. It just runs a do shell script command which deletes the prefs file. Being a GUI-oriented type of person, it's easier for me to just click it to have it run right before debugging. This version of the script asks for the prefs file to delete, though it can also be customized: http://www.markdouma.com/developer/DeleteAppPrefs.zip. If you've never run it before, you get the choose file dialog, and the chosen file is saved as an alias inside the actual AppleScript, so you're not asked again. You can drag the icon onto AppleScript Editor to take a look at the script or change it).
Anyway, then, if I'm going to release a new version of an app that uses a new toolbar layout, and want to prevent the config from being overridden, I'll change the toolbar's identifier (or autosave name) to something like "docToolbar2.0".

Why are some Siebel objects read only?

I want to add some extensions to an existing Siebel application, but the objects which I need to change remain (partially) read only, despite I have locked the respective parent projects.
E.g.
Add a Menu item to the application main menu. => I can edit existing items, but I cannot add new items (Tool's menu "New record" is disabled.)
Add a custom applet to view "Sales Home Page View". It's read only (Warning displayed by Tools when I click "Edit web layout").
Any ideas, why?
Seems to be a bug in Siebel Tools. After a restart of Tools I was able to perform the desired changes.