Forum > LCL

[UPDATE] TOpenDialog - 100% CPU - Fan Revs Up

<< < (7/9) > >>

del:
Update: I thought I'd try to explicitly specify GTK2 as the widget type

--- Quote ---LCLWidgetType:=gtk2
--- End quote ---
and the original problem (TOpenDialog - 100% CPU - Fan Revs Up) came back. So it looks like it's a problem in GTK2 somewhere. Which I have no real interest in using. So I'm gonna use GTK3 (libgtk-3.so.0 => /usr/lib/libgtk-3.so.0) for a while (the fonts are bigger than with QT5 - may be a system setting) and see how that goes.

dbannon:
Great, I will be very interested to see how you go using GTK3.  You were, almost certainly using GTK2 originally, its the Lazarus default on Linux.

If you revert back to qt5, there is a utility, qt5ct, that you can install using your distros package manager that will let you alter a number of display parameters for qt5 apps. Things like colors, fonts, sizes, styles etc.  Pretty useful if you like fiddling to get exactly what you want.

Davo

del:
Thanks Davo. I've used QT in the past with Python and C++ and I like it. It seemed to work great. There was one weird thing: the TProgressBar seemed backwards. I have a vertical one in my app that's supposed to fill up like a thermometer. It was upside down, like gravity was up. So as it showed "progress" the bar descended from its origin at the top. But I can deal with stuff like that.

I was curious about the C++ / wxWidgets app (very similar functions) that I built last week to test / compare. It behaved normally as I described in a previous post:
--- Quote ---ldd $(which CppOps) | grep gtk
   libwx_gtk3u_xrc-3.1.so.5 => /notroot/WXWIDGETS/build/lib/libwx_gtk3u_xrc-3.1.so.5 (0x00007fd3a9570000)
   libwx_gtk3u_html-3.1.so.5 => /notroot/WXWIDGETS/build/lib/libwx_gtk3u_html-3.1.so.5 (0x00007fd3a9496000)
   libwx_gtk3u_qa-3.1.so.5 => /notroot/WXWIDGETS/build/lib/libwx_gtk3u_qa-3.1.so.5 (0x00007fd3a9466000)
   libwx_gtk3u_core-3.1.so.5 => /notroot/WXWIDGETS/build/lib/libwx_gtk3u_core-3.1.so.5 (0x00007fd3a8c05000)
   libgtk-3.so.0 => /usr/lib/libgtk-3.so.0 (0x00007fd3a2d4e000)
--- End quote ---
It looks like its default was GTK3. Thanks everyone for all the help - I've learned a lot  :)

dbannon:

--- Quote from: del on November 01, 2021, 02:58:11 am ---There was one weird thing: the TProgressBar seemed backwards. I have a vertical one in my app that's supposed to fill up like a thermometer. It was upside down, like gravity was up. So as it showed "progress" the bar descended from its origin at the top.

--- End quote ---

I probably live on the opposite side of the world than you, so we are used to things being upside down.


Seriously, if you can replicate that issue in a very small app, I'd log it as a bug, zeljko, who looks after Qt5 is very helpful.

Davo

del:

--- Quote from: dbannon on November 01, 2021, 12:10:14 am ---Great, I will be very interested to see how you go using GTK3.
--- End quote ---
I'm glad you asked. Not so good. GTK3 fixes the original problem. But I can't use TSaveDialog because it segfaults on create


--- Quote ---[FORMS.PP] ExceptionOccurred
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $00007F95BAF38BC4
--- End quote ---

That's with release build run from the command line. If I run it from Lazarus in the debug mode I get this:
--- Quote ---Project CustomOps raised exception class 'External: SIGSEGV'.

 In file 'gtk3/gtk3wsdialogs.pp' at line 1279:
CreateOpenDialogHistory(OpenDialog, PGtkWidget(FileSelWidget));
--- End quote ---
I get the impression that the bindings for GTK3 have been stagnant for several years. Here is the library on my machine

--- Quote ---libgtk-3.so.0 => /usr/lib/libgtk-3.so.0 (0x00007fb1ec884000)
libgdk-3.so.0 => /usr/lib/libgdk-3.so.0 (0x00007fb1ec790000)
--- End quote ---
Maybe the bindings are mature and GTK3 is stable and this is just an easy bug. Or it may be the first worm in a can of worms. So for now I'm switching to QT5. :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version