Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Widgetset
»
QT
»
30sec Freeze per click in GTK3 file dialog under QT5 widgetset
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
TChart: +32% Processor lo...
by
Thaddy
[
Today
at 05:09:52 pm]
CompareText improvement
by
Stefan Glienke
[
Today
at 05:07:58 pm]
An ASCII logo for Pascal ...
by
Fred vS
[
Today
at 03:34:59 pm]
Setup landmap - databse
by
WimVan
[
Today
at 03:31:15 pm]
Improvement of packages/f...
by
lagprogramming
[
Today
at 03:12:57 pm]
[SOLVED] SysTraIcon event...
by
SWM1
[
Today
at 02:40:47 pm]
pdfium.dll loadfromfile f...
by
domasz
[
Today
at 02:14:41 pm]
[SOLVED] Timer
by
Pe3s
[
Today
at 12:36:33 pm]
QT5 PageControl Tab sizes
by
zeljko
[
Today
at 12:07:55 pm]
[ SOLVED ] Json parse pro...
by
superc
[
Today
at 11:58:37 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: 30sec Freeze per click in GTK3 file dialog under QT5 widgetset (Read 968 times)
AlexTP
Hero Member
Posts: 2045
30sec Freeze per click in GTK3 file dialog under QT5 widgetset
«
on:
December 14, 2022, 03:49:49 pm »
Please see, Zeljko:
https://github.com/Alexey-T/CudaText/issues/4674
Can you do something here?
Logged
CudaText editor
-
ATSynEdit
-
More from me
zeljko
Hero Member
Posts: 1412
Re: 30sec Freeze per click in GTK3 file dialog under QT5 widgetset
«
Reply #1 on:
December 14, 2022, 05:20:05 pm »
No, sorry, I cannot follow / debug each theme for qt. It is known (from Qt bugtracker) that there are some issues with gtk2/3 themes since Qt uses gtk libs to paint controls and also gtk native dialogs. I've spotted that it might have something with our clipboard implementation (qtobjects.pas) since gtk dialog triggers enormous number of clipboard selection events when shown and maybe that could be the reason.
Open dialog does not have such problem, only saveDialog (if you provided filename). Try saveDialog without provided filename and see if it lags also and let me know.
Logged
AlexTP
Hero Member
Posts: 2045
Re: 30sec Freeze per click in GTK3 file dialog under QT5 widgetset
«
Reply #2 on:
December 14, 2022, 06:05:34 pm »
I told the user to test save-dialog without initial filename. He confirmed: click on filenames freezes there (not in open-dialog).
What can we do?
Logged
CudaText editor
-
ATSynEdit
-
More from me
zeljko
Hero Member
Posts: 1412
Re: 30sec Freeze per click in GTK3 file dialog under QT5 widgetset
«
Reply #3 on:
December 14, 2022, 08:30:34 pm »
Debug our lclqt (4,5,6) clipboard selection implementation and create patch. qtobjects.pas
procedure TQtClipboard.signalSelectionChanged; cdecl;
function TQtClipboard.EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl;
That's what I remember that was bottleneck with gtk theme and gtk dialogs, but didn't have time to investigate and fix it.
Same routines are used in qt/qtobjects.pas , qt5/qtobjects.pas and qt6/qtobjects.pas.
Logged
dbannon
Hero Member
Posts: 2363
Re: 30sec Freeze per click in GTK3 file dialog under QT5 widgetset
«
Reply #4 on:
February 12, 2023, 07:10:04 am »
Might help other users if we spell out what is, and is not, a problem.
Debian Bullseye, Bookworm, Ubuntu 22.04 (Qt5 5.15) not a problem.
Ubuntu 20.04 (Qt5 5.12) with Mate or KDE Desktop is a problem with some dialogs (SaveAs, Font), even if no Qt5 theme is set.
I don't have any VMs at present with a Qt5 between 5.12 and 5.15, maybe everyone except the long termers have moved on and thats a really good thing.
So, a summary, probably best to avoid Qt5 if the underlying Qt5 is less that 5:15, thats especially so if you a Qt5 theme of gtk3. But the native Qt theme looks heaps better anyway !
Davo
«
Last Edit: February 12, 2023, 08:50:50 am by dbannon
»
Logged
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project -
https://github.com/tomboy-notes/tomboy-ng
AlexTP
Hero Member
Posts: 2045
Re: 30sec Freeze per click in GTK3 file dialog under QT5 widgetset
«
Reply #5 on:
February 12, 2023, 08:05:26 am »
2 PCs with Ubuntu.
1) Ubuntu 20.04 has a problem.
2) Ubuntu 22.04 with Qt5 5.15 - no problem (even if I set GTK3 dialogs in qt5ct).
Logged
CudaText editor
-
ATSynEdit
-
More from me
dbannon
Hero Member
Posts: 2363
Re: 30sec Freeze per click in GTK3 file dialog under QT5 widgetset
«
Reply #6 on:
February 12, 2023, 08:54:40 am »
Yes Alex, its U20.04 thats the problem, Debian Bullseye has a later Qt5 so, no issues.
Sadly, U20.04 still has some time to go ! I tell my users to use GTK2 version on U20.04, even if they are using Plasma/KDE !
Davo
Logged
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project -
https://github.com/tomboy-notes/tomboy-ng
rca
New Member
Posts: 41
Re: 30sec Freeze per click in GTK3 file dialog under QT5 widgetset
«
Reply #7 on:
March 02, 2023, 04:28:55 pm »
Try disabling QtUseNativeEventLoop in
lcl/interfaces/qt5/qtdefines.inc
Code: Pascal
[Select]
[+]
[-]
{.$DEFINE QtUseNativeEventLoop}
Go back to Build Lazarus and recompile the applications.
Logged
AlexTP
Hero Member
Posts: 2045
Re: 30sec Freeze per click in GTK3 file dialog under QT5 widgetset
«
Reply #8 on:
March 02, 2023, 05:16:12 pm »
@rca, what is the 'price' of such LCL change? LCL breaks in other places?
Logged
CudaText editor
-
ATSynEdit
-
More from me
rca
New Member
Posts: 41
Re: 30sec Freeze per click in GTK3 file dialog under QT5 widgetset
«
Reply #9 on:
March 02, 2023, 05:25:20 pm »
Quote from: AlexTP on March 02, 2023, 05:16:12 pm
@rca, what is the 'price' of such LCL change? LCL breaks in other places?
I have already recompiled several applications that I have, and so far everything is OK.
Logged
rca
New Member
Posts: 41
Re: 30sec Freeze per click in GTK3 file dialog under QT5 widgetset
«
Reply #10 on:
March 06, 2023, 05:34:48 pm »
In the lazarus_2_2_4 or lazarus_2_2_6 (stable) branch, in
lcl/interfaces/qt5/qtdefines.inc
, QtUseNativeEventLoop is only enabled for MacOSX cocoa 64.
Code: Pascal
[Select]
[+]
[-]
{$IF DEFINED(LINUX) or DEFINED(FREEBSD) or DEFINED(NETBSD)}
{$DEFINE HASX11}
{$ENDIF}
{Qt must use native event loop at least under MacOSX cocoa 64}
{$IFNDEF HASX11}
{$DEFINE QtUseNativeEventLoop}
{$ENDIF}
I see that the change was made to the main (trunk) branch about three months ago:
"Qt5: use native event loop on all platforms."
https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/df5754c7f4ff8a16b62eaadb0053b9a74f8dc6fa
Code: Pascal
[Select]
[+]
[-]
{Qt must use native event loop at least under MacOSX cocoa 64}
{.$IFNDEF HASX11}
{$DEFINE QtUseNativeEventLoop}
{.$ENDIF}
By leaving QtUseNativeEventLoop enabled for all platforms, in my case I have linux, tested with Fedora 37, Debian 12 the problem appears when opening the dialogs both in Lazarus IDE and in the created applications.
Logged
zeljko
Hero Member
Posts: 1412
Re: 30sec Freeze per click in GTK3 file dialog under QT5 widgetset
«
Reply #11 on:
March 14, 2023, 05:55:38 pm »
That can highly rely on current Qt theme. I don't spot any slowness with dialogs here (Fedora 35, KDE, so Breeze is default style).
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Widgetset
»
QT
»
30sec Freeze per click in GTK3 file dialog under QT5 widgetset
TinyPortal
© 2005-2018