You are not logged in.

#1 2009-01-02 04:17:29

ljshap
Member
From: Ossining, NY
Registered: 2008-01-23
Posts: 160

C++ and Qt

Does anybody object to, or have problems with Qt seeming to be a complete programming language instead of just a gui toolkit.  I know its very feature rich and powerfull, but it seems the more you use it, the more married you will be their code.  I'm not saying this is intentional, but its a tactic a certain company in Redmond Washington would use.  One example that drives me nuts is their QString and QChar which you have to use instead of a standard String class string or a C-string.  I know they provide conversion methods, but thats a pain-in-the-butt.  You almost get the feeling that its easier to switch than fight, but then you won't be able to use the fstream or other classes without conversions.  Ideally, my programs would primarily be C/C++ (except for the necessary widgets) and not a Qt program.  Qt is obviously C++ based, but in reality its a totally different language even without their moc compiler and other under.the.hood stuff.

  I'll probably get flamed for this because its not very well thought out or technical, but I just felt like ranting.   I'm a total Qt newbie and have been away from C/C++ for a long time (#R$E# visual basic) so what I said above may apply equally to all the other gui toolkits, I really don't know.


Live Free or Die !

Offline

#2 2009-01-02 04:48:13

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

Re: C++ and Qt

Qt is not a toolkit for me. This is a complete framework.
From Trolltech:

Qt [cute] is a cross-platform application framework

When you choose a techno, this is always hard to switch after you have write a lot of code.
This is the same if you choose C# or if you use java to create a website.

Why do you want to be completly independant? smile

Offline

#3 2009-01-02 14:35:36

ljshap
Member
From: Ossining, NY
Registered: 2008-01-23
Posts: 160

Re: C++ and Qt

Why do you want to be completly independant? smile

Not completly independent, just 98.6% independent.  smile

  Not exactly sure how you meant that comment tongue so I'll take it literally. 
   
  C/C++ was intended to be a cross-platform portable language, so it would be nice to stick to the ANSI/ISO standard as much as possible, especially if you switch to a different toolkit or "application framework" in the future.  When I was using C/C++ with DOS, I used both MS Quick C and Borland Turbo C++.  Since C did not have a graphics library both vendors had their own implementation of it.  Moving the cursor with one vendor may have been settextposition (row, col) and movecursor(col,row) with the other.  Same functionality, but different syntax, not exactly portable.    Innovation should not be sacrificed for the sake of standards, but standards should not be sacrificed just for the sake of change.  (See Internet Explorer and MS changes to Java).

  I probably did want just a tool kit instead of a complete application framework, so I really don't have a right to complain.  To me, a gui is a "necessary evil" with the primary functionality provided in the non-gui code.  It would be nice if you could stick to language standards for the primary "guts" of the program.  Can't explain it rationally, but thats just my own preference. 

  If QString and other non-gui proprietary Qt classes significantly increases functionality, I DO deserve to be flamed or at least scolded.  My knowledge of "cute" is extremely limited!


Live Free or Die !

Offline

#4 2009-01-02 14:49:10

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

Re: C++ and Qt

QString is fine and posses a lot of methods you can use. smile

It would be nice if you could stick to language standards for the primary "guts" of the program.

You can do it with Qt. Create your "core" as a standard C++ librairy and a small "Qt class" to manage the gui.
Anyway, this is always a good ideas (for me) to separate different layer of a sofware (Like MVC).

@+

Offline

#5 2009-01-03 01:02:45

ljshap
Member
From: Ossining, NY
Registered: 2008-01-23
Posts: 160

Re: C++ and Qt

You can do it with Qt. Create your "core" as a standard C++ librairy and a small "Qt class" to manage the gui.
Anyway, this is always a good ideas (for me) to separate different layer of a sofware (Like MVC).

I may write some "helper" functions for the conversions and go the Qt class route latter.

  Thanks


Live Free or Die !

Offline

#6 2009-01-03 01:29:19

damjan
Member
Registered: 2006-05-30
Posts: 452

Re: C++ and Qt

Qt is definitelly going over C++ ... and that is a good thing. And it's probably more cross-platform than any other C++ code you'll write. I don't see any problems here.

Offline

#7 2009-01-11 15:27:55

gnud
Member
Registered: 2005-11-27
Posts: 182

Re: C++ and Qt

Also note that Qt is seperated into several libraries -- you can link only against QtCore and QtGui, if that is all you need. If you want more, there is QtXml, QtNetwork, QtWebkit (:D) etc.

Offline

#8 2009-01-12 03:08:55

ljshap
Member
From: Ossining, NY
Registered: 2008-01-23
Posts: 160

Re: C++ and Qt

gnud wrote:

Also note that Qt is seperated into several libraries -- you can link only against QtCore and QtGui, if that is all you need. If you want more, there is QtXml, QtNetwork, QtWebkit (:D) etc.

At this point, I'm pretty much sticking to GtCore and QtGui.  I guess what I was looking for was a gui toolkit instead of a full blown application framework.  Although I'm a Qt newbie, there is a lot I like about it, especially how it rescales widgets when you change the size of the form.
If somebody asked me what programming language I was using, I wouldn't know whether to say C++ , Cute or "Cute C++".

  The good thing is that using Qt does give you a better sense of OOP, I just would have preferred if they used standard C++ classes where available instead of their own, but I'm sure they had good reasons for doing it.  I'm a standards fanatic, but thats not always possible.  I probably would have felt the same way if I was using gtk or wxwidgets. 

Thanks


Live Free or Die !

Offline

#9 2009-01-12 22:29:14

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: C++ and Qt

I know you have already started, but have you considered wxwidgets?

Offline

#10 2009-01-13 15:28:34

ljshap
Member
From: Ossining, NY
Registered: 2008-01-23
Posts: 160

Re: C++ and Qt

SiC wrote:

I know you have already started, but have you considered wxwidgets?

Actually I considered both wxwidgets and gtk before deciding on Qt.  Most of the time I've spent has been useful, although some of it has been Qt specific.  I'll continue using Qt until I finish the current functionality of the program I'm working on, and then take another look at wxwidgets.  I'm in a better position to make comparisons now than I was before using Qt.

  Thanks


Live Free or Die !

Offline

#11 2009-01-13 16:18:28

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: C++ and Qt

I recommend you to go with QT when you have the choice between QT and wxwidgets. [Disclaimer: I haven't used QT for any projects yet and don't know about problems with it.]

Offline

#12 2009-01-14 02:57:00

ljshap
Member
From: Ossining, NY
Registered: 2008-01-23
Posts: 160

Re: C++ and Qt

wuischke wrote:

I recommend you to go with QT when you have the choice between QT and wxwidgets. [Disclaimer: I haven't used QT for any projects yet and don't know about problems with it.]

Cool disclaimer! cool The difference between you and a politician is; the politician would have left out the disclaimer. wink


Live Free or Die !

Offline

Board footer

Powered by FluxBB