Forum > Linux
(Solved) built IDE for qt5
(1/1)
HotShoe:
I played with another distro for a month and accidentally overwrote my current. No problem the home dir was backed up. So, after reinstalling my current chosen distro, I used fpcupdeluxe to install Laz/Fpc as normal.
It all went fine but this time I decided to install laz for qt5, so I grabbed libqt5pas and the dev and the qt5 version of fpcupdeluxe. I told fpcup to upgrade the current install and it did. OK, so everything has worked as it should up to now, but when I get into Laz to make sure things compile as they should, the lazarus desktop is all jumbled together in the center of the screen.
I rearrange it all and save my desktop, but the next time I open Laz, it is all jumbled again. Out of curiosity, I rebuilt Laz using GTK2 instead of qt and the laz desktop is arranged as it should be each time I open laz now.
Is the qt widget set not allowing laz to read the desktop file or something? I'd really like to use the qt version, but it is more trouble than it is worth right now. Any suggestions would be appreciated.
Here is my setup :
KDE neon linux
Ryzen 7 in an HP laptop w/ 32 gig memory, 1 tb ssd & 1 tb hd
AMD radeon graphics
FPC 3.2.2 lazarus 3.6
Thanks,
--- Jem
cdbc:
Hi
That's probably 'Wayland' that's acting up...
Regards Benny
Fred vS:
--- Quote from: cdbc on January 19, 2025, 09:20:34 pm ---Hi
That's probably 'Wayland' that's acting up...
Regards Benny
--- End quote ---
Probably... ;)
@HotShoe: If you want to use Qt5, maybe start a X11 session (login and select X11 vs Wayland for graphic server) and rebuild Lazarus using Qt5 on the X11 session..
If you re-start a session using Wayland, XWayland (the X11 emulator) that will be used to run Lazarus could maybe deal with the windows positions.
Maybe because "classic" Wayland dont deal with window positions.
dbannon:
or set an environment variable that tells Qt5 to use xcb rather than Wayland.
Easy test is to set it just for the run -
QT_QPA_PLATFORM=xcb ./lazarus <enter>
If you start lazarus from your menu system, you will have a desktop file, probably /usr/share/applications/lazarus.desktop, if so, edit it, as root, find the line that looks like this -
--- Code: Bash [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Exec=startlazarus %fand make it look like -
--- Code: Bash [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Exec=env QT_QPA_PLATFORM startlazarus %f
(I have not tested it with startlazarus but no reason I can see why it would not work. I normally start lazarus directly, "$>./lazarus" because startlazarus is not necessary if your lazarus files are in your own user space.)
As long as you start these apps from the command line, you can set this env var in your .bashrc so it applies to your Qt5 (and Qt6) apps -
$> echo "export QT_QPA_PLATFORM=xcb" >> ~/.bashrc
And source it (or close and reopen terminal). A better solution would be to set it system wide but I am not going to get into an argument about the best way to do that !
Do not be concerned about (partially) bypassing Wayland, it adds no value to your system, is, IMHO slower and lacking important features. Maybe, one day it will be fit for purpose but not yet. RedHat pushed it to Fedora because they want to fast track its development and they don't really care about Fedora, only RHEL. The other felt they had to follow (again, IMHO).
Davo
HotShoe:
Thanks guys, I completely forgot about the wayland problems. I am so used to xorg that I didn't think about it. Times change and new is not always better :D
Thanks,
--- Jem
Navigation
[0] Message Index