Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Qt and maemo5

    Reply
    Page 2 of 2 | Prev |   1   2 |
    lcuk | # 11 | 2009-09-21, 11:22 | Report

    Use what works best with the app you want to write and the language skills you have.

    There are strengths and weaknesses in every framework and language, and we have the ability to pick and choose the best components from any of the stacks.

    we are maemo, we have choice.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    attila77 | # 12 | 2009-09-21, 11:34 | Report

    Originally Posted by TA-t3 View Post
    If you want to program in C, or Vala, use Gtk, if you want to program QT you'll have to use C++. (If there's a wrapper for C -- sounds unlikely -- I'm unaware of it).

    I for one will never program in C++, so an UI based around QT isn't as attractive to me as a Gtk UI.
    The level of C++ knowledge required (over C) to use Qt is fairly minimal (that is IMHO also the reason why nobody bothers to do a C wrapper). Considering how gobjects mimic, well, objects, one could argue that the difference is mostly in syntax. If you have a problem using a C++ compiler or have a personal dislike for stuff written in C++, that's OK, but for most people this is pretty much a non-issue.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to attila77 For This Useful Post:
    Corwin_bg, VDVsx

     
    TA-t3 | # 13 | 2009-09-21, 12:34 | Report

    Well, you're effectively saying that most people are completely happy with writing in C++. Maybe this is true, but maybe not. In any case it's of course possible to write using any toolkit, as long as run-time libs are available. However, the fact that it doesn't take too much C++ knowledge to use QT isn't an issue, the point is that if you write your UI stuff in C++ you're in practice pretty much forced to write the actual application in C++ too. I for one prefers pretty much any other object oriented language before I will touch C++.

    We can write in any toolkit, but it's not as interesting to write a Gtk application for an UI which is based on Qt.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    attila77 | # 14 | 2009-09-21, 14:02 | Report

    Originally Posted by TA-t3 View Post
    the point is that if you write your UI stuff in C++ you're in practice pretty much forced to write the actual application in C++ too. I for one prefers pretty much any other object oriented language before I will touch C++.
    That's not what I tried to say. I'm saying GTK's gobjects are not as far from Qt's QObjects (which are of course C++) as one may think, the signal/slot mechanism is fairly similar, etc. I don't really understand what's *forcing* you to use C++ outside of referencing Qt's objects (except the benefit of, say, subclassing various Qt classes).

    Take a look at the hello world comparison - I don't see this being THAT much different. When I needed to rewrite some of my code from Qt to GTK (some gstreamer related stuff for Fremantle), I really was under the impression that the differences are primarily in syntax (a la someting_new() instead of new something() and show(something) instead of something.show()), the C/C++ split never occured to me.

    Code:
    int main(int argc, char *argv[])
     {
       QMainWindow *window;
       QPushButton *button;
    
       QApplication app(argc, argv);
    
       window = new QMainWindow();
       button = new QPushButton("Hello world!");
    
       app.connect(button, SIGNAL("clicked()", window, SLOT("close()"));
    ...
    Code:
    int main (int argc, char *argv[])
    {
      GtkWidget *window;
      GtkWidget *button;
    
      gtk_init (&argc, &argv);
    
      window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
      button = gtk_button_new_with_label ("Hello World");
    
      gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
    			     GTK_SIGNAL_FUNC (gtk_widget_destroy),
    			     GTK_OBJECT (window));
    ...
    I'd like to underline that I'm not pushing for either framework, it's just that I don't understand after some dabbling with both, what's the big deal with the C++ thing (when you're going to do the same thing in GTK, just with a different metaobject system). Maybe I'm just too pragmatic and look at stuff differently than others, so, to avoid transforming this thread into YAGVQT (yet another gtk vs qt thread), that will be all from me on this topic

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to attila77 For This Useful Post:
    vkv.raju

     
    TA-t3 | # 15 | 2009-09-21, 16:32 | Report

    Don't get me wrong, I don't doubt at all that the actual widget handling is quite similar (nicer, actually) when done in C++/Qt compared to C/Gtk (except that Gtk gets so much easier when using Vala instead of C ), what I tried to say was that if you write the UI handling in C++ you would really want to write the rest of the application (the part that actually does something) in C++ too, which I personally don't wish to. I agree that the C++/Qt API itself is decent.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by TA-t3; 2009-09-21 at 18:45.
    The Following User Says Thank You to TA-t3 For This Useful Post:
    Jaffa

     
    Page 2 of 2 | Prev |   1   2 |
vBulletin® Version 3.8.8
Normal Logout