Replies: 95 comments
-
Excellent, and thanks for notification as well! Here is what I can report so far from version downloaded yesterday:
This happened on Windows 11, on high DPI (2880x1800) display. Not sure if that matters, but the old version works fine on this system.
Porting to the new version was easy, so once that rendering issue is fixed I think I will be ready to use QHexView 5.0 full-time. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback! |
Beta Was this translation helpful? Give feedback.
-
Pubic access to So I'd say if you come up with a way to hide |
Beta Was this translation helpful? Give feedback.
-
Update on the rendering issue: Tested on an older notebook (Windows 10, 1366x768 display), messed up there as well. Old version works fine on that machine. Try changing display resolution of your virtual machine, perhaps you have accidentally hardcoded some value that happens to work for you particular resolution? |
Beta Was this translation helpful? Give feedback.
-
I need two informations (so I can try to reproduce this issue):
I've tried to change the resolution and used different fonts, I can't reproduce it. |
Beta Was this translation helpful? Give feedback.
-
Qt version is 5.14.2. The result of this (on Windows 11):
is
Let me know if you need font results from the other Windows 10 machine. |
Beta Was this translation helpful? Give feedback.
-
Looks like I found the fix for this. The issue is in Lines 206 to 219 in 34e1dcb Convert the result of this into
Like this, for example:
This brought everything back to normal for me. I have no idea how exactly this fixes the issue, but I suppose using |
Beta Was this translation helpful? Give feedback.
-
Great! Pushed! Let me know if it's ok now. |
Beta Was this translation helpful? Give feedback.
-
Everything looks fine. Now, to the lesser issues:
The green color demonstrates the issue, the black one is just cursor selection, working correctly.
The
In the old version I used a small hack to adjust widget's size to what is actually being rendered (to remove that useless white space after ASCII column) by calling The whole idea of what is the best way to resize
This view has 17 rows, two of which are not seen. Scrollbar steps correctly, that is, twice, as it is supposed to. I am only pointing out its appearance. Shouldn't it be longer? For comparison, this is a scrollbar from a QTreeView with 17 root items (not expanded), it is twice as large: Other than that everything else that I use appears to work well so far. Editing works fine, both in Hex and ASCII areas, both modes, insert and overwrite work correctly. I mentioned changing font above, that works well too. |
Beta Was this translation helpful? Give feedback.
-
I've fixed 1, 2, 5 and 6 along with a bunch of other minor fixes/improvements. About the other issues:
|
Beta Was this translation helpful? Give feedback.
-
The reverse of that, if I understood the question correctly. But this could work too I suppose. Either way I would like widget's width (just width, not height) to be "synchronised" with the actual content, with what is being drawn (hex , ASCII areas, etc.). Right now widget draws offset, hex and ASCII columns and anything after that is wasted space (if widget's width is larger than what these 3 columns occupy). So if widget is too wide I think its width should be reduced. In the old version I did something like this:
It may have some implications since widget is programmatically resized, but the idea seems to be worth exploring.
I figured it out. New QHexView does not create QHexDocument unless it is explicitly set by Line 36 in b3c0e4a My program crashed because of this:
The simplest way to fix is to just copy that single line from the old version. Although perhaps cursor mode could be set directly from A few more bugs:
In this screenshot there is actually one more line at offset 0xF0. It is not visible, thus scrollbar is supposed to appear, but it doesn't. Reducing widget's height slightly makes scrollbar to appear. |
Beta Was this translation helpful? Give feedback.
-
I have added And I've also fixed all issues you have reported, an empty QHexDocument is created by default too, like the previous version. |
Beta Was this translation helpful? Give feedback.
-
Issue 8: Now scrollbar area appears, I can see up and down arrows, but the scrollbar itself is not there, so I am still unable to scroll down to the 0xF0 line.
When Also while the widget itself correctly adjusts its width, the |
Beta Was this translation helpful? Give feedback.
-
And there is also one more thing that could be restored from the old version: in Hex area bytes |
Beta Was this translation helpful? Give feedback.
-
I've improved the scrollbar's behavior, issue 8 should be fixed. You can highlight any byte by using QHexOptions options;
options.bytecolors[0x00] = {Qt::lightGray, QColor()}; // {Foreground, Background}
options.bytecolors[0xFF] = {Qt::darkBlue, QColor()}; // {Foreground, Background}
hexview->setOptions(options); It's also possible to highlight bytes from the widget itself with these functions:
By default the new version doesn't highlight anything. |
Beta Was this translation helpful? Give feedback.
-
The goal is to retain compatibility with the version 5.6.3 though, according to this discussion - #69 |
Beta Was this translation helpful? Give feedback.
-
Had to make some trivial changes to make the widget buildable with
Switched to this widget because it natively supports UI dark mode and overall looks much nicer than QHexEdit2 I've used before in UEFITool: LongSoft/UEFITool@cba31d8 Huge thanks for making it, and for using MIT license. Minor feature ideas (might implement some and send PRs later):
|
Beta Was this translation helpful? Give feedback.
-
Dark mode in Linux with Qt 6.2.4, global scaling 200% on 5K display. Works really well! |
Beta Was this translation helpful? Give feedback.
-
A minor bug to report: macOS starting with 10.7 has scrollbars hidden by default and shown only when scrolling is performed. Had to make this modification to restore the expected behavior there:
|
Beta Was this translation helpful? Give feedback.
-
Also, the default font in macOS is somehow not a monospace one, so I had to manually call |
Beta Was this translation helpful? Give feedback.
-
I see that you happen to be in possession of a high resolution monitor. There is a bug related to these. Could you confirm that it happens on your Linux and Macintosh systems as well? The bug is described here - #71 (comment). Make sure to call The reason behind it is yet to be determined, so any assistance would be appreciated. |
Beta Was this translation helpful? Give feedback.
-
I have done an internal implementation (implemented as
I have found a
Fix done as you suggested
Is there some way to set a monospace font for MacOS? There is a conditional statement that may create some issues, this is the relative code: |
Beta Was this translation helpful? Give feedback.
-
There is If data is changed externally I think it's sufficient to trigger an update manually with Qt's |
Beta Was this translation helpful? Give feedback.
-
@Dax89, not really a fan of platform-specific hacks, and it feels like a Qt-issue more than a QHexEdit-issue, but I'll investigate those font shenanigans further. @T-640, I don't use the flag you mentioned because UEFITool is only using Qt 5 for a single legacy platform (x86 Windows XP and newer), with explicit refusal to support HiDPI on anything that is not built against Qt 6. As mentioned on https://doc.qt.io/qt-6/highdpi.html, "Qt 5 behavior assumes that AA_EnableHighDpiScaling has been set (this flag is not needed on Qt 6)". |
Beta Was this translation helpful? Give feedback.
-
@Dax89, @T-640, looks like the issue is reproducible even with Qt 6.5.0 and without the explicit HiDPI flag, just resizing the window with nothing but QHexView widget slowly, a moment can be caught where the next line is already drawn (so now about a half of line is visible), but the scroll area is not yet updated (so it can't be scrolled to become fully visible). The window can then be resized back a tiny bit, making the visible potion even smaller. Resizing further back or forward fixes it, but it can be repeated indefinitely. |
Beta Was this translation helpful? Give feedback.
-
Do you have an example? Because in this case, I think I have to create a document with a reference to the data (without copying it on each data update). |
Beta Was this translation helpful? Give feedback.
-
I suppose that the RAM is just a buffer of bytes updated by a virtual CPU, outside the control of the widget. In this case I think QMemoryRefBuffer is what you need, because it takes an external buffer without copying it. For example: #include <QHexView/model/buffer/qmemoryrefbuffer.h>
#include <array>
static std::array<char, 8> BUFFER = {
'm', 'y', 'b', 'u', 'f', 'f', 'e', 'r'
};
// QByteArray is also accepted
QHexDocument* hexdocument = QHexDocument::fromMemory<QMemoryRefBuffer>(BUFFER.data(), BUFFER.size());
hexview->setDocument(hexdocument); If you want something even more specific you can also roll your own model inheriting from QHexBuffer class. |
Beta Was this translation helpful? Give feedback.
-
Guys, is there any way to scroll to a highlighted area? I tried manually method QHexView::scroll(0, 20) and it does produce a really weird output. It seems the whole area is shifted down: |
Beta Was this translation helpful? Give feedback.
-
The widget scrolls automatically if the cursor (or selection) is outside of visibile range, otherwise it doesn't do anything. The method |
Beta Was this translation helpful? Give feedback.
-
This commit: 2bafc90
Let me know if I broke something on your side by opening new issues, thanks! PS: I have converted this issue in a Discussion. |
Beta Was this translation helpful? Give feedback.
-
QHexView 5.0 is now under development! The widget is almost rewritten from scratch in order to keep its codebase as simple as possible.
I'm interested to listen all feedbacks here in order to create the best release as possible (if anyone is interested, of course!).
The current widget's appearance is this one:
Changes:
Known Bugs/Missing Features:
Mouse input can be improvedSelection highlighting can be improvedHorizontal scroll is not implementedWants:
Windows support (I work in a Linux environment, but I can test it on WIndows too)Restore highlighting supportRestore comments/notes supportBranch Link: https://github.com/Dax89/QHexView/tree/5.0
Sample code
@audetto @T-640 @neomissing @aerosoul94
If you are not interested, feel free to ignore this notification/email!
Beta Was this translation helpful? Give feedback.
All reactions