The Ability to Modify the Qt Source Code - Does it Matter?

Can I modify Qt and use the modified source code?

Yes, you can modify the source code of the Qt framework. You can also distribute products using the modified source code, as long it is in object form. You can also share the modified source code with the Qt Company for possible inclusion in upcoming releases.

Why is the power of source code modification so decisive for many Product Leaders?

To appreciate the value of source code modification, it helps to look at what other UI and application frameworks allow. Many frameworks, such as some game development platforms, permit users to “look” at the source code. Some of the mainstream game platforms will allow the modification of their source code for commercial purposes depending on the license package. Some allow source code modification for "private" use, but such rights are more academic than helpful in business.

I don't want to diminish the significant value of understanding what happens inside the black box when you develop plug-ins or use APIs. But as we all know, “looking at” and “touching” are two very different things. The freedom to modify the framework source code can enable enterprises to implement short-term tactical and long-term strategic moves.

Edu_license_image2

The Ability to Improve the Source Code

Production schedules and volumes might force embedded device makers to implement bug fixes themselves as a tactical resolution to reduce their impact. While the cross-platform vendor's job is to fix bugs in due time, the software world is not perfect. The ability to fix things yourself (when you want to) can significantly affect your bottom line, public reputation, or even your developer team's job satisfaction. It doesn't mean that you should be prepared to fix things yourself. You are paying after all for quality software. But as always, being able to make exceptions ensures your ability to control your destiny.

Personally, with 20 years of experience in steering software development, I'm always cautious when considering modifying third-party source code temporarily. However, I like having the power to decide whether to accept the disadvantages of branching away from the third-party code for a good reason.

Aiming at Strategic Differentiation

Product differentiation is essential to contrast your product from competitors. Without going too much into the aspects of product strategy, there are times you might want to modify the UI and application framework to stand out from the market significantly. Sometimes expanding the framework is just not good enough. While such strategic modifications come with long-term implications, such as higher service and maintenance expenses for the modified software, the freedom to differentiate should not be limited to things you develop "on top" of the application framework. This, by the way, might be the reason why many top game studios choose to build and maintain their own game development platform. Modifying a particular part of an application framework can be the jump start to product differentiation.

Selecting an application framework that allows source code modifications enables enterprises to create their own story, either at the beginning or during the lifetime of their product.

 

PS: If you want to see the details of your rights with Qt, then do check out chapter 2.3 (Modified Software) on our Terms & Conditions page.


Blog Topics:

Comments

Commenting for this post has ended.

Jakub Narolewski
3 points
55 months ago

Awesome :] Any news about potential changes in QWebSockets module? :P

Mårten Nordheim
0 points
55 months ago

Hey, thanks! For 6.0 it was decided that we want to have a more limited scope to focus on the core/base components, so QWebSockets is not 'officially' supported in 6.0. But it will be brought back shortly after! I don't know anything more about the plans beyond that I'm afraid.

C
cliff
2 points
55 months ago

Could you remove the limit of 6 instances of QNetworkAccessManager? And I can't understand why you do this limit for Qt5?

Mårten Nordheim
0 points
55 months ago

There's no limit on how many instances of QNetworkAccessManager you can have (although our documentation recommends only having one instance). Are you perhaps talking about the limit of parallel connections QNetworkAccessManager will make in the background to a single host? That limit only counts for HTTP 1(.1) and was/is fairly standard. For HTTP/2 it's actually limited to only 1 connection, but thanks to how the protocol is made up it can actually send multiple requests per connection, so it doesn't need any more.

C
cliff
0 points
55 months ago

Yes, I am talking about the parallel connections. But I still hope you to remove this limit because QNetworkAccessManager is a very useful library et everywhere needs it, even in some urgent cases. For example, in the Security Industry with alarms, we hope continuously post the images immediately. If you still won't change ideas, it doesn't matter. But if we buy a commercial license, could you help us to remove this limit?? Thanks.

PS, the Http protocol is the best way to communicate with other languages et system, doesn't it? So I hope you can seriously think about it. Thanks again.

Mårten Nordheim
0 points
55 months ago

If you compile Qt on your own then as far as I'm aware (never tried) this is the only line that needs to be changed to increase it: https://github.com/qt/qtbase/blob/dev/src/network/access/qhttpnetworkconnection.cpp#L68

C
cliff
0 points
55 months ago

Thanks, I will try immediately. But I want to know what's your philosophy to set the value 6 ? I know a book named "the philosophy of Unix" which explains many things at the top level. And I want to get the same philosophy from you.

Mårten Nordheim
0 points
55 months ago

I wasn't around when the choice was made so I don't know the definitive source, but it was chosen to be 6 since that matched what major browsers used at the time (and largely still do for HTTP 1) and was considered a reasonable fit for Qt as well.

https://stackoverflow.com/a/30064610/2493610

C
cliff
0 points
55 months ago

You are so kind and I now know everything about it. In fact, the browsers are the applications for the client, so they can set the value 6 because peoples havn't 20 or 1000 eyes (another reason is the work of rendering is heavy). But Qt is a neutral library, the developers should do what they want, only limited by OS or physical. So removing the limit is still a good idea, this is only my suggestion, you can do as you like.

Last question, if I modify it myself, set defaultHttpChannelCount = 1000 even 60000, that's enough? Should I modify the other things, by example, which are the best values for defaultPipelineLength and defaultRePipelineLength when HttpChannelCount is 1000 or 60000? Sorry I have troubled you so much. But this is really an interesting thing.

Mårten Nordheim
0 points
55 months ago

Right, as I mentioned earlier I haven't tried it myself, but in theory changing defaultHttpChannelCount is enough. Pipelining isn't enabled by default so unless you enable it it's not going to make a difference what you set those to. Do keep in mind that if you set it to 60000 then it will allocate 60000 channels as well, even if for some connections you only end up using 10. There might also be limits on the server on how many connections you, or perhaps anyone in total, can establish before they start getting dropped.

Markus Goetz
0 points
49 months ago

I recommend to vote and subscribe to and maybe comment on https://bugreports.qt.io/browse/QTBUG-25280 :-)

ekke
2 points
55 months ago

good to see that there's some work on QTBUG-86966 to provide infos on Network Connection State. really need this for nearly all of my apps.

Leonid Dulman
0 points
55 months ago

Hi to all What I can use insteed of QNetworkConfiguration Thank you

Mårten Nordheim
0 points
55 months ago

QNetworkConfiguration has a few things available. There's no replacement for it in 6.0 though. What about QNC are you currently using?

Carlos Enrique Pérez Sánchez
0 points
55 months ago

Can be the linking between Qt Network and QML optional? I don't see why should I deploy Qt Network in an application that does not uses network capabilities at all.

Ed
0 points
46 months ago

Redirect not happening automatically and I can't seem to get it to work with any policy.

G
GamesForOne.com
0 points
45 months ago

Where is the FTP plugin in Qt 6.1.2?

G
GamesForOne.com
0 points
43 months ago

Still no FTP plugin or support in Qt 6.2?