QComboBox highlight breaks when disabling "Editable" - pyqt5

When i set a QComboBox to be non editable the item highlighting breaks.
more specifically, whenever i hover my mouse on an item, a white rectancgle hides all the item, and i essentially cant see what is the item i am hovering on. when i change the object to be editable, the hovering works ok.
Anybody have any idea how i can fix this bug on my end? is non editable inherently different class than editable QComboBox which causes this weird collision?
I am using QT designer to generate the UI code, and then i use pyuic.exe script to convert the .ui to .py code. I do not edit the .py code.
I am using version PyQt5
Thanks in advance.
Edit:
the following is the section inside the resulting .py file regarding this specific object:
self.block_list = QtWidgets.QComboBox(self.monitors_groupBox)
self.block_list.setGeometry(QtCore.QRect(10, 50, 401, 31))
font = QtGui.QFont()
font.setFamily("Comfortaa")
self.block_list.setFont(font)
self.block_list.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.block_list.setMouseTracking(False)
self.block_list.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
self.block_list.setAutoFillBackground(False)
self.block_list.setStyleSheet("")
self.block_list.setEditable(False)
self.block_list.setObjectName("block_list")

The issue ended up being a stylesheet entry in the MainWindow that trickled down all the way to affect all QComboBoxes. the simple entry was:
background-color: rgb(255, 255, 255);
This causes the QComboBox to become completely white when hovering on it with the mouse.
Sidenote:
The reason i was not able to reproduce the issue when using Qt Designer Preview mode is that i had to select Preview in Fusion, which is not the default way, and only in Fusion does this bug occurs.
Thank you #musicamante for your guidence and assistance

Related

Pycharm - How do I set the page margin? [duplicate]

The other day I mis-clicked on and mis-dragged something probably and then the left "side bar" of the editor window got wider than normal.
Since this happened by mis-clicking and dragging, I don't know how to reset it back to the normal width. It simply doesn't respond when I try to click and drag the borderline. Didn't find anything related in Settings either.
It's not possible to change the gutter width at the moment. It adjusts itself automatically when needed (e.g. there is a gutter icon for override method and a breakpoint on the same line).
Looking at your screenshot, the width is actually standard. It needs some extra space to allow you setting breakpoints without accidentally clicking the line number.
You could submit a feature request/usability problem to https://youtrack.jetbrains.com/issues/IDEA, but to me, it seems fine.
But since you say it was different the other day and then something happened and it became wider, you could try starting PyCharm with default settings by renaming/removing configuration folder. Here is the article on how to find it.
Go to Settings -> Editor -> General -> Gutter Icon and uncheck the Show gutter icons.
But you should be careful: this action will hide information about recursive calls, override methods etc...

How do I remove the "stripe marks" from navigation bar and project window?

I use a handlebars plugin to be used with requirejs in my project. This makes Webstorm report an error if I require a template using the plugin-specific syntax:
var template = require('hbs!./sometemplate.hbs');
This is fine; I can easily control how the editor should present this error in my javascript file.
However, I cannot seem to figure out how to remove the "stripe marks", which appear in my navigation bar and project window:
How do I remove the red stripes from my windows, but not from the actual javascript file?
You can't. I can only suggest disabling error highlighting for the files where you use such require statements. This can be done using Hector icon in the lower right corner: open your file in editor, click the Hector icon and then move the slider to change the Highlighting level to None. See http://www.jetbrains.com/webstorm/webhelp/changing-highlighting-level-for-the-current-file.html.
BTW, WEB-1167 is fixed, so using this plugin-specific syntax shouldn't be a problem in next release.

Wrapping comments with line breaks in PyCharm

I have comments that gets balloon (PEP 8: Line too long ... > 120)
I wish there was a command that will wrap the lines with few keystrokes.
Right now, even if I type Alt+Enter and press enter on Reformat file, nothing actually changes. Is there a setting or plugin I could use to accomplish the formatting easily?
Under the Edit menu, there is a Fill Paragraph option, which does what I believe you want. You can assign a key command to this in Preferences, under Appearance & Behavior -> Keymap (search for "fill").
Personally, I choose first stroke Esc, second stroke Q, because that's what I've always used in Emacs...
Firstly, reformatting won't work, not in Python at least, where whitespace is important. PyCharm's "Wrap when typing reaches right margin" option is what you're looking for. Now this will not work when you copy and paste code, but in the places where it gives you trouble, just press enter, and it will work.
To be able to auto-reformat comments (and code, for that matter) to honor a right margin after the fact, go into Project Settings under Code Style and then further under Python. Click the Wrapping and Braces tab, and check the "Ensure right margin is not exceeded" checkbox.
Now if you select a region of lines and then run the Code/Reformat Code... command, PyCharm will do its best to wrap the comments or code appropriately.
You will probably have to do some tweaking of the results to suit your stylistic taste. For example, I wish PyCharm would do aggressive filling of text in block comments, at least optionally so.
PyCharm will not reformat code such that it becomes invalid Python, so sometimes it will still leave a line longer than the margin (120 or whatever you set under Project Settings/Code Style/General).
With recent PyCharm this now is located at "Editor -> Code Style", with the checkbox named "Wrap on typing"
The Screenshot shows PyCharm version 2016.2.1 Professional.
Updated Answer:
Use "soft wraps." You can search for it in the help bar.
View > Active Editor > Use Soft Wraps
It won't work for existing text or text that's copied in, but will for any newly typed text.

How to programmatically add Tooltip for InlineEditBox in dojo 1.8

I'm using dojo 1.8.1 and have two inline editors, one for a Textarea, and one for an Editor. I would like to provide flyover tips to help explain how they should be used. Ideally, I'd like to seed the inline editor's textarea / editor with a hint if there is no content, and have this disappear when they click to edit the missing content (the underlines with the writer icon didn't do it for me -- if I can replace that span that would be okay too). However, as a start it would be nice to have a tooltip show when mousing over the entry area.
There is a parameter in the constructor for the InlineEditBox called noValueIndicator where you can put the hint for content when none has been supplied and it disappears when the editor has focus for entry. Too simple -- horses, not zebras...

Dreamweaver CS 5.5 ver 11.5 Built 5315 damages the document. How to solve it?

I have downloaded Dreamweaver CS5.5 version 11.5 Built 5315. It seems to be the newest one.
But the problem is that it changes the view of the document window. It looks like usual windows-style window (please see the screenshot). Before this version I used CS5 ver 11.0 Built 4909 and document window had normal view and style, just the same as whole Dreamweaver – it was grey with small text in title and small icons on the top right corner, just usual like it has to be.
But more than that, it behaves strange way when you resize that document window. It breaks long lines of code to the new line when you make document window smaller instead of just hiding it under the right side like in previous version.
What can it be? Is it possible to turn it to normal view and behavior? Has anyone had such problem? Please, help to solve it.
No idea about the window styling, I always work with maximized document windows, so I don't know if this was a change, or there is something specific with your system.
Dreamweaver's default is to use word wrap in code view, this has been the case for many versions of Dreamweaver, if your older version wasn't using word wrap then that is something that you turned off. You can turn that off from View -> Code view options -> Word Wrap, or via the Word Wrap button in the code toolbar (along right side of your document window) in your screenshot it appears to be the bottom activated button it has an arrow on that starts on the bottom right of the icon and point to the left.