The QPixmap class has a constructor that takes a QSize parameter and therefore allows you to create a pixmap of a given size. That is what @jsulm is doing in the first line of his last code example. Documentation.
Looks like it might be a limitation/bug. The behavior is the same with 5.6
You should go to the bug report system to see if it's something known. If not please consider opening a new report providing a minimal compilable example (not just the code files) to reproduce the behavior.
@raven-worx Thanx for the suggestion. I think we can go a long way with this, except that we are on Windows and it seems we need some Windows-specific MIME-conversions. We'll try to tinker a bit with that.
But, I also expect that when I am resetting the attribute of WA_InputMethodEvent my widget should no more get the input method events anymore, and thats how it works on Qt on OSX.
I don't know how it works on OSX, I can say for sure though that QObject::eventFilter is executed before the QObject::event method (this is documented) and since you're not giving Qt leeway to process the event as it ordinarily would in the overriden QWidget::event method (you stop the event propagation when you return true from the event filter) you shouldn't expect it to respect the widget attribute. That's what I'm claiming. You should move your code from the eventFilter method to a QWidget::inputMethodEvent override.
As I said - QTextEdit is not an HTML browser. It handles rich text and stores it as styled text blocks. It accepts subset of HTML as input but it does not store it as such. So it doesn't put the content in <p>. It simply has no notion of <p>, <div> etc. at all. That's the source of the remark in the docs, that the stylesheet is only applied on entry. After that there are no <div> to style. The output you get back is a result of another conversion, where every paragraph is simply output as <p>. It does not reflect what you input.
Take a look at the link I posted previously. QTextEdit supports only subset of HTML/CSS. It does not support class attribute or a "border" CSS property.
How about you try to operate directly on text blocks, and not go through HTML? Here's an example for a chat-like formatting:
Dear @peniwize, I am not aware of direct entry of special symbols in QLineEdit in MAC but in WINDOWS OS we can do with the help of ALT key and the symbol code. Basically go to Character Map and select the special symbol then you will be able to see the corresponding Key code to that special character. Just hold ALT symbol and enter the code from num pad by enabling NUM LOCK. Then release the ALT key. That special symbol will automatically appear in the QLineEdit in Windows. May be something similar you can try in MAC OS too.
The relative path will be relative to the current working directory of the running process. This is >quite unlikely to be where the source code is (esp. if you are shadow building).
Your hint is almost right. Of course, I use the build and not the source directory.
The point is that QTextEdit understands the image path within the HTML file also only if the image path is relative to the working dir of the running process and not to the directory of the HTML file.
So now my HTML file looks like: