Recent

Author Topic: (Solved) built IDE for qt5  (Read 735 times)

HotShoe

  • New Member
  • *
  • Posts: 38
(Solved) built IDE for qt5
« on: January 19, 2025, 08:58:56 pm »
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
« Last Edit: January 20, 2025, 06:16:24 pm by HotShoe »

cdbc

  • Hero Member
  • *****
  • Posts: 1868
    • http://www.cdbc.dk
Re: built IDE for qt5
« Reply #1 on: January 19, 2025, 09:20:34 pm »
Hi
That's probably 'Wayland' that's acting up...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Fred vS

  • Hero Member
  • *****
  • Posts: 3480
    • StrumPract is the musicians best friend
Re: built IDE for qt5
« Reply #2 on: January 19, 2025, 11:05:17 pm »
Hi
That's probably 'Wayland' that's acting up...
Regards Benny

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.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

dbannon

  • Hero Member
  • *****
  • Posts: 3223
    • tomboy-ng, a rewrite of the classic Tomboy
Re: built IDE for qt5
« Reply #3 on: January 20, 2025, 12:14:39 am »
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  [Select][+][-]
  1. Exec=startlazarus %f
and make it look like -
Code: Bash  [Select][+][-]
  1. 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
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

HotShoe

  • New Member
  • *
  • Posts: 38
Re: built IDE for qt5
« Reply #4 on: January 20, 2025, 12:37:22 am »
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

 

TinyPortal © 2005-2018