Sublime Forum

Is Qt framwork is use used in sublime?

#1

well
I’ve been amazed by sublime’s UI/UX
I had a thought , that most cpp applications uses Qt framwork as its gui framwork
but actually never seen something like sublime’s UI written in Qt
so the question which hits the mind : could Qt be that far good ?
or , which gui framwork has been used to end up with such an amazing GUI ?

I know this might not be that much “technical”
but I feel its the right place to ask in

thanks in advance

0 Likes

#2

Simple answer: No!

Sublime Text uses a special GUI framework which is developed and maintained by the authors themselves with simplicity and performance in mind.

0 Likes

#3

developing a new framwork from scratch ? isn’t it a bit overkill ?
I mean the application runs on windows / linux and mac , developing a new gui framwork would take a lot of work ig

0 Likes

#4

Is it overkill? That’s a matter of opinion. But I think the quality of the output speaks for itself.

3 Likes

#5

As it just needs to run an editor the scope of use is quite limited and thus the framework can be optimized to do only what’s needed instead of a bloated Qt, which is meant to be used for just anything. ST uses some functions of GTK on Linux to interact with the OS. On Windows it uses DirectWrite for text rendering or Win32 API as a backend.

See ST’s size: 7MB binary.

See QT-Apps minimal size: 70MB or so.

So which one is overkill?

0 Likes

#6

Comment from 2011, https://news.ycombinator.com/item?id=2822114

And no, I don’t think developing a new custom toolkit is overkill on certain cases like Sublime. This type of choices makes a lot of sense when you want to develop real-time performance apps like 3d tools or games and you don’t want to have the whole overhead of full-feature toolkits such as qt, wxwidgets, gtk, … If you exactly know which type of widgets subset you’ll need on your app/s it’s a good choice to come up with a custom solution. The same thing goes when not using custom 3d engines such as UE4, Unity, Ogre,Cryengine … might save you time up front but may not give you the flexibility and functionality you need and you’d be reliant on bugs it has or changes in it’s future functionality.

Let me put it differently, if I know I just want a 1% of features provided by a particular library, why would I use that particular library instead creating my own providing that 1% and improving it over time?

3 Likes

#7

hmm , interesting that they made abstraction layer for the system specific apis

0 Likes

#8

well , I should admit , yeah using the whole bloated framwork would be overkill incompare to what they did

0 Likes

#9

It seems sublime_text.exe uses a third-party library called skia, maybe that’s used internally by the internal UI toolkit to draw some widgets? who knows… :confused:

0 Likes

#10

At least it’s not Electron based…

2 Likes

#11

toolkits such as skui works on top of skia, so my last guess could be plausible :slight_smile:

0 Likes

#12

skia is a rather low-level library which google chrome is built on. It can be compared to something like the old gdi for Windows. It can draw shapes, render lines handle colors etc. ST uses it for several calculations. If I recall some comments correctly, the use of Skia was reduced recently. But in the end, Skia can’t be compared to Qt.

1 Like

#13

The downside is that Japanese input does not work on Linux. If an established framework had been used it would have been trivial to fix. As it stands it will likely never happen.

0 Likes

#14

That’s basically right for general UI stuff, but the main edit control’s functions are not part of any control shipped with Qt/GTK and would therefore need to be implemented by the authors anyway.

Even though I don’t personally need it, I am with you about missing RTL text layout capabilities are a big disadvantage for a globally available tool. With a look into some functions of ST I’d wonder how to make them work well with RTL or even mixed texts on the other hand. It is a very sophisticated task, I think.

To my surprise even Scintilla a well known editor control which is used in Notepad++ and some other popular editors, seems to support RTL text in the most recent builds only.

Version 4.1.0 adds experimental support for bidirectional text as used by Arabic and Hebrew on Win32 and Cocoa.

So I’d rather to oppose to the statement of such a missing feature to be easily fixed. It was possible only, if you can completely rely on existing controls in a framework, which would limit flexibility in creating new innovative workflows.

This doesn’t apply to the web based electron approaches, but they come with other more important downsides in manner of performance and memory usage.

0 Likes

#15

Well, before creating a product you usually decide beforehand which will be your niche market, maybe Sublime’s author considered that RTL wasn’t high-prio and he wanted to ship anyway at the time… That doesn’t mean these type of features can’t be implemented anytime (even if not considered from the very beginning). At the end of the day it’s all about priorities/resources/deadlines…

As it stands it will likely never happen.

Well, choices are quite easy here, if the feature was really considered high-prio and you can’t deliver it you’d end up hiring more people, open sourcing your product or making your software extensible to allow someone else do the job for you.

My whole point is, these kind of tradeoffs happen when you decide to go with a custom solution and that doesn’t mean it hasn’t been a wrong choice instead using a full-feature standard framework.

https://www.csgsolutions.com/blog/custom-software-vs-off-shelf-pros-cons/

0 Likes