@JonB
Thanks for your response.
+
I use built-in model. Yes it's clang
I thought it's because of git.
+
So, i thought that QVector is more preferable than QList. Also i already used QVector in all other code.
P.S. Why should i call explicitly QCommandLineParser in CommandLineParser? Isn't it called implicitly?
@Khamza It is quite hard to tell. The piece of code you pasted has several issues unfortunately, and it would very hard to say what the exact cause it without the whole thing to reproduce.
I'll say that the most pressing problem in the code is that you are using values that are in document coordinates (which is what the rectangle that QAbstractTextDocumentLayout::blockBoundingRect returns is in) to calculate parameters for a QPainter which works in viewport coordinates. These are not the same, especially when there are scroll bars shown, and in my experience the main cause of issues around scrolling.
That said, it wouldn't explain the text itself just disappearing when scrolling back up; I'd expect it to just be garbled. First try to comment out your paintEvent to see if text is drawn correctly at the expected positions when scrolling back and forth - perhaps something in the formats isn't right. Otherwise, please post a complete yet minimal project that reproduces the problems you see.
@Wintermute said in Detecting system tray background color:
(this is Flowkeeper, fwiw)
This is great :)
I could have used this during my studies, as most time/task planners and ToDo tools are crap :D
The Implementation to handle a custom Protocol in the Application does no more work in Qt 6.8.2 as described above (only the C++ programming part, the other stuff - Info.plist etc. remains unchanged)
The correct way to implement such a handler is to use
void QDesktopServices::setUrlHandler()
See https://doc.qt.io/qt-6/qdesktopservices.html#setUrlHandler
This paragraph also describes how to set Info.plist etc...
This most likely also would have worked in 6.5.3 - why did I never find it?
For Windows all of this works quite differently. Registering works through well known registry entries:
[HKEY_CLASSES_ROOT\myprotocol]
"URL Protocol"=""
[HKEY_CLASSES_ROOT\myprotocol\shell]
[HKEY_CLASSES_ROOT\myprotocol\shell\open]
[HKEY_CLASSES_ROOT\myprotocol\shell\open\command]
@="\"path to application.exe" \"%1\"
This will just start a new instance of the application with the custom protocols URL as first parameter %1. Its the applications responsibility to handle that correctly (i.e. call a existing instance via a QLocalSocket etc.
Hi and welcome to devnet,
QAbstractScrollArea might be a starting point if you want to go from scratch.
QTextEdit could also be an inspiration.
Take into account that "infinite" means also extensive use of memory so you should have something that unloads useless stuff when not shown as otherwise it's going to eat your system's resources.
@jeremy_k said in How to draw a transparent area selection box:
If there's no initial underlying window belonging to the application, the window manager is going to have to cooperate and not deliver the mouse button press to something else.
That's the sort of thing I was thinking of. I didn't know plain applications had access to the visual desktop, only to the windows the manager allowed it to create. But I don't really know.
@sierdzio said in QMouseEvent::pos() returns different values on different OS:
No, it is not related to the style selected. I checked on Windows and it has no shift on Windows Vista, Windows and Fusion.
@RudrakshS
So you dont want to provide any more information?
e.g.
what layout, if any?
move which widgets from where to where?
how does the destination look like? empty widget or any other stuff in it?
You dont have to apologize, but YOU have an issue with your code, not us :)
If you dont show what you've done, one can only guess.
If it is, what I think it is, then you are missing a layout somewhere or make any unallowed "moves".
At the end I've researched again the view's transformations and concluded to support both features and warn for the complexity.
I did not re-implement the add/remove items of the scene together with a group. Thanks for the hint @Asperamanca .
SetMinimumSize() does not work for me. I think it is because I change the window's position. However, the problem was in my form file. For an unknown reason, it changed the window's size to 802x600 when I was checking for 800x600. Maybe there was some another way out, but now all works just fine.
To solve the VCINSTALLDIR problem, start the command prompt from your start menu -> Visual Studio 2017 -> x64 Native Tools Command Prompt (be sure not the ones with x86)
Then call :
set PATH=C:\Qt\5.14.1\msvc2017_64\bin;%PATH%
to make both vc and qt dirs in your PATH.
To force deploying the release binaries, add --release after windeployqt.