Results 1 to 6 of 6

Thread: Qt source complexity

  1. #1
    Join Date
    Nov 2009
    Posts
    10
    Thanks
    1
    Thanked 1 Time in 1 Post

    Question Qt source complexity

    Has anyone checked the complexity of the Qt source? What do you think about it?

    I happened to check source of QString and some other Q classes today and I must say, it was a horrifying experience! We are talking about huge-scary-monsters!

    I am no professional C++ programmer, but I do java development for a living, and I decided to get into C++/Qt for fun. Is this kind of complexity normal for all programs? For comparison I also decided to check the GTK sources and I found it orders of magnitude simpler than Qt!

    -- Edit -- For example compare these:
    qstring.h
    gstring.h

    -- Edit -- I do realize that there is a lot less functionality to gstring; still however qstring seems like a monster to me.
    Last edited by agnus; 18th November 2009 at 00:22.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt source complexity

    I'd say Qt source code is very complex. But I'd also say it is very wise in what it is doing. Complexity of Qt code comes mostly from two things - maintaining binary compatibility across versions and "need for speed"
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt source complexity

    I've certainly checked it before to see what was possible and try to track down some bugs. I thought it was well documented and not that difficult to follow. What type of code would you describe as "huge-scary-monsters" ?

    Some of it is more complicated than it needs to be, but I'd say that was from flexibility and enhancements throughout the years.

    I've seen much much worse code at work, specially when a manufacturer has said "We have prewritten code for our chipset", and we take one look and go "!!!", and then look elsewhere for another cheaper chipset that we can develope our own code for.

  4. #4
    Join Date
    Nov 2009
    Posts
    10
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default Re: Qt source complexity

    Quote Originally Posted by fatjuicymole View Post
    What type of code would you describe as "huge-scary-monsters" ?
    Hi fatjuicymole, I edited my post. See the links I put.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt source complexity

    Quote Originally Posted by agnus View Post
    -- Edit -- For example compare these:
    qstring.h
    gstring.h

    -- Edit -- I do realize that there is a lot less functionality to gstring; still however qstring seems like a monster to me.
    I'm not sure what this is to prove... that QString has more functionality including Unicode support, knows how to handle overloads and more code is inlined for speed? Yes, that's all true.

    I really miss the point of comparing two completely different things
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt source complexity

    Quote Originally Posted by agnus View Post
    Hi fatjuicymole, I edited my post. See the links I put.
    That doesn't really answer the question. All that says is that Qt's QString is 10 times larger and much more featureful than GTK's GString. Give the later 5 years to enhance and optimise, and I'll be suprised if they are not more similar in both size and complexity.

    It's like comparing Windows 7 to Windows 3.1 and saying Windows 7's source code is huge and complex compared to 3.1's.

Similar Threads

  1. Flat data source for QTreeView/Model
    By mawt in forum Qt Programming
    Replies: 1
    Last Post: 18th October 2009, 17:20
  2. problem in installing qt4.4.3 source
    By wagmare in forum Qt-based Software
    Replies: 0
    Last Post: 18th February 2009, 07:48
  3. An Editor for source view - help
    By QuTe in forum Newbie
    Replies: 2
    Last Post: 19th November 2008, 08:11
  4. out of source qtopiamake???
    By izico in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 20th March 2007, 19:31
  5. Replies: 11
    Last Post: 24th March 2006, 07:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.