Page 1 of 1
Qt subsystem stable?
Posted: Tue Oct 13, 2020 2:55 pm
by ProphetOfDoom
Hi,
I just replaced an old Linux Mint installation with Ubuntu 20.04 and I had to change the subsystem for my app to Qt because the webkitgtk is hopelessly broken. However I saw some posts to the effect that the Qt subsystem is new and unstable. Am I likely to run into issues later on? My GUI is going to make extensive use of many different features. I wonder if I would be better off just writing my app in another language like Gambas maybe? I don’t really want to do that though as I like PB’s Blitz Basic heritage. And also I might want to port my app to Windows in future. Any thoughts?
Re: Qt subsystem stable?
Posted: Tue Oct 13, 2020 5:21 pm
by Saki
Nobody will be able to tell you that.
If the existing bugs are fixed, you can certainly use it primarily.
Otherwise you can use it for everything where the bugs do not bother you.

Re: Qt subsystem stable?
Posted: Sat Oct 17, 2020 1:39 pm
by mk-soft
I think QT runs better than GTK3 and looks better.
If you don't want to do any special functions with the GUI, I can only recommend this.
The description and possibilities to work with QtScript are still missing some examples.
But on the target system you have to install "QT" as well. But I don't see this as a problem.
[sudo apt install qt5-default] without developer packets.
Link:
viewtopic.php?f=15&t=74875
Re: Qt subsystem stable?
Posted: Sun Oct 18, 2020 10:26 am
by Saki
With QT under Linux you are so far right, it is the future here.
gtk3 is something I neither want nor need.
I don't know what the developers were thinking.
If you could at least turn off the special gtk3 "features".
That would certainly not be difficult to implement.
And the thick, ugly edges around the gadgets only take up unnecessary space and cause various problems.
But QT still has some annoying bugs at the moment. (5.73 b2)
Try the small code and see what causes it and what it causes.
This is now a standard procedure, nothing special, that does not work !
Code: Select all
window_ID=OpenWindow(#PB_Any, 0, 0, 400, 400, "", #PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_Invisible)
button_ID=ButtonGadget(#PB_Any, WindowWidth(window_ID)/2-100, WindowHeight(window_ID)/2-100, 200, 200, "How")
HideWindow(window_ID, 0)
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
I will wait and see with QT first.
This will surely be all right with time.
Re: Qt subsystem stable?
Posted: Tue Oct 20, 2020 1:46 am
by Zach
Saki wrote:With QT under Linux you are so far right, it is the future here.
gtk3 is something I neither want nor need.
I don't know what the developers were thinking.
If you could at least turn off the special gtk3 "features".
That would certainly not be difficult to implement.
And the thick, ugly edges around the gadgets only take up unnecessary space and cause various problems.
But QT still has some annoying bugs at the moment. (5.73 b2)
Try the small code and see what causes it and what it causes.
This is now a standard procedure, nothing special, that does not work !
Code: Select all
window_ID=OpenWindow(#PB_Any, 0, 0, 400, 400, "", #PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_Invisible)
button_ID=ButtonGadget(#PB_Any, WindowWidth(window_ID)/2-100, WindowHeight(window_ID)/2-100, 200, 200, "How")
HideWindow(window_ID, 0)
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
I will wait and see with QT first.
This will surely be all right with time.
Yea, doesn't work. Kind of surprising
I've always been a fan of QT. I know there are challenges, but given its prevalence on all the major platforms these days, it makes the perfect framework to support for languages like PB who strive for cross-platform compilation. A single, relatively unified GUI framework is better than learning half a dozen toolkits on 3 different OS's
Re: Qt subsystem stable?
Posted: Tue Oct 20, 2020 10:58 pm
by ProphetOfDoom
Hi, thanks for your replies. I’m still undecided what to do. The fact that I discovered PureBasic’s gtk to be so flaky doesn’t exactly fill me with confidence about Qt. I’ve even looked into writing my app in C and using gtk directly. But this would probably take four times as long as in PB and would also mean shipping gtk with any future Windows version. Ew. I will never use a Qt/C++ combination because I consider C++ a horrible octopus of a language that gets its tentacles everywhere. I think I’m just going to continue with PB and Qt until proven wrong!
BTW I don’t recall having to install any Qt dependencies on my Ubuntu... are they shipped with Ubuntu? Or maybe I did install them and just forgot..
Re: Qt subsystem stable?
Posted: Wed Oct 21, 2020 7:16 am
by infratec
Qt has one big disadvantage:
It is very expensive if you want to sell your application.
If you use it for commercial software you have to pay for the license.
And it is not cheap.
Re: Qt subsystem stable?
Posted: Wed Oct 21, 2020 9:24 am
by ProphetOfDoom
Hullo infratec,
I was surprised at what you said and so I did some googling... it seems that if the application is dynamically linked with Qt, only the LGPL applies. But it almost looks like they are deliberately using vague language to try and intimidate people into buying a commercial licence. In any case I guess PureBasic links Qt in statically so the LGPL would be violated?
Re: Qt subsystem stable?
Posted: Wed Oct 21, 2020 9:27 am
by infratec
https://www.qt.io/licensing/
If you use it for open source, private, academic projects, you can use it for free.
But if you want to sell a closed source application ...
https://www.qt.io/product/features#js-6-3
You need to fulfill LGPLv3 for your application.
And we can not / want to fulfill all requirements.
Re: Qt subsystem stable?
Posted: Wed Oct 21, 2020 2:22 pm
by Saki
Yes, it's like infratec says.
The basic idea of Linux is that everything is free and freely available.
So QT itself does not fit into this framework.
I was very surprised when QT became available because of this license story.
If I would only work under Linux now,
I would probably use gtk3.
It runs almost everything that runs on Windows and Mac.
I myself work with small offsets, which I can adjust globally when gtk3 is "optimized" again.
So everything can be adjusted again.

Re: Qt subsystem stable?
Posted: Wed Oct 21, 2020 2:51 pm
by Shardik
Qt has another disadvantage (the same as other cross-platform frameworks like wxWidgets, IUP etc.): it has the same look on all OSes. For a developer this is big advantage and eases software development. But a lot of users (especially Apple users) prefer a native look of their applications, so it may be an advantage to utilize the native GUI framework of the respective platform. Although that attitude may currently be changing with the current trend to develop GUIs running in web browsers where the GUI is also identical on all platforms.
Re: Qt subsystem stable?
Posted: Wed Oct 21, 2020 4:29 pm
by ProphetOfDoom
Thanks Saki and Shardik for clarifying. The more I look into this problem, the more I see that there is no perfect solution. Just a lot of different compromises.
My project is an IDE and graphical debugger for a programming language I made. I would post a link here but last time I did that Fred told me off because he said it was a “competing product”.
It’s open source but of course none of us knows the future so we’d like to choose a toolkit with a liberal license just in case it becomes important later on.
I am so thrilled with my IDE so far and PB is so rapid, it took me only about four days to sketch out all the main features. I have a feeling it would be more like weeks or months if I switch to C.

Just thinking out loud really.
Re: Qt subsystem stable?
Posted: Wed Oct 21, 2020 6:53 pm
by skywalk
It is admirable to attempt both IDE and compiler.
Are you using LLVM as your back end?
Re: Qt subsystem stable?
Posted: Wed Oct 21, 2020 7:16 pm
by ProphetOfDoom
skywalk wrote:It is admirable to attempt both IDE and compiler.
Are you using LLVM as your back end?
Hullo there skywalk. That’s a nice thing to say. No, in retrospect that would probably have been a good idea, but I just made it output 64-bit x86 assembly as a list of strings, to put in a file to feed to nasm. So it’ll take a long time if I want to port it to ARM. I started this compiler when I was younger and not a great programmer and I didn’t think very abstractly but just wanted to “get things done” the quickest way.
I wish Fred would let me post a link to it. It must be the only BASIC compiler that is censored on here. Admittedly my post regarding it sounded more like an advert, but it’s free and open source and so it really isn’t a competitor to PB. Fred if you’re reading this, please can I at least post a link to my github?
Re: Qt subsystem stable?
Posted: Thu Oct 22, 2020 3:12 am
by useful
Our discussions on such topics do not make any sense.
They are completely ignored by Fred and Co.
I have lost hope to understand what they think about the future of the Linux version.
But at the same time, I believe that there will be some development.
And I learn to be content with what is.