Author Topic: My pretty Qt!  (Read 13779 times)

Offline incorrect user

  • Multiple posting newcomer
  • *
  • Posts: 24
My pretty Qt!
« on: September 18, 2007, 07:40:58 am »
Hi everyone! This forum is dedicated to writing Qt-based programs! If you are interested in this you are invited to discuss any bugs/incomplete things in C::B's Qt interface in order to improve our best IDE!
By the way, who knows why C::B is not based on Qt,but on wxWidgets???Is the last one better?
I challenge you to prove this!

Regards, incorrect user ;)
Take quality as a rule!

Offline incorrect user

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: My pretty Qt!
« Reply #1 on: September 18, 2007, 07:53:23 am »
I need help!
It's not a secret that any Qt program must be compiled using makefile generated with qmake. But how can i automate this process in C::B?
Take quality as a rule!

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: My pretty Qt!
« Reply #2 on: September 18, 2007, 08:48:17 am »
Hi. You can try http://code.google.com/p/qtworkbench/
It is reported that due to an sdk version change the current binary win32 release is not compatible with the current night builds but I haven't checked as I 'm rushing to get some new features in.
« Last Edit: September 18, 2007, 08:51:05 am by yop »
Life would be so much easier if we could just look at the source code.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: My pretty Qt!
« Reply #3 on: September 18, 2007, 09:01:58 am »
By the way, who knows why C::B is not based on Qt,but on wxWidgets???Is the last one better?
I challenge you to prove this!

Please don't start a flame. C::B is not based on Qt because the devs prefer wxWidgets.

You may hold your own opinion about Qt and may think it is the best. Similarly wxWidgets users do hold similar opinions about it. C::B forum is not the place to start a war between these two groups.

You're free to hold that debate in another site; but not in C::B forum.
Be a part of the solution, not a part of the problem.

Offline incorrect user

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: My pretty Qt!
« Reply #4 on: September 18, 2007, 09:29:15 am »
Please don't start a flame.

No problem, but i think that even C::B devels dream rewrite it under Qt. But, ok, let them do their own decisions!

I just want to improve C::B for convinient Qt developing.

QtWorkbench is not the best way, cause we don't need a special plugin for using qmake, we can just define pre-build steps like this:

qmake -project
qmake
make Release

and proper targets (like ./release/my_program[.exe]), and be happy, but we need to define them for each project manually. So it's quite tiring!

If we make and use the user template, i wonder about useless of Qt wizard!

I think we must correct this situation.

Regards, incorrect user ;)
Take quality as a rule!

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: My pretty Qt!
« Reply #5 on: September 18, 2007, 10:30:53 am »
I just want to improve C::B for convinient Qt developing.

You're most welcome to do that. :)

QtWorkbench is not the best way, cause we don't need a special plugin for using qmake, we can just define pre-build steps like this:

I hold no opinion about QtWorkbench plugin as I've never used it. But looking at other peoples' responses, it seems a number of peoples have found it useful.

qmake -project
qmake
make Release

and proper targets (like ./release/my_program[.exe]), and be happy, but we need to define them for each project manually. So it's quite tiring!

If we make and use the user template, i wonder about useless of Qt wizard!

I think we must correct this situation.

I am among one of the peoples who take care of these wizards. But I don't use Qt, and I don't know how an app based on Qt is compiled (Apart from an Hello World! app). I can try the steps you've outlined and take care of the bugs present in the present Qt wizard. But don't expect an wizard which will setup everything you need to do Qt programming. It will mostly remain as a wizard which will setup a basic Hello World app.

Alternatively you can also make modifications to the wizard and post a patch. I'll put it in repo in due course.
« Last Edit: September 18, 2007, 10:34:34 am by Biplab »
Be a part of the solution, not a part of the problem.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: My pretty Qt!
« Reply #6 on: September 18, 2007, 06:53:16 pm »
Quote from: incorrect user
By the way, who knows why C::B is not based on Qt,but on wxWidgets???Is the last one better?

Quite simple: when Code::Blocks' development started Qt wasn't an option. One of the focuses of this IDE was, and still is, to be crossplatform. The problem is that only Qt 3 was available then, and the license it had for Windows wasn't helpful at all (only commercial license). When Qt 4 was released with its new license for Windows, Code::Blocks 1.0rc1 was about to be released. It would have been quite difficult and time consuming to modify the current implementation to make it use Qt; furthermore, it would have taken a good amount of time for the developers to become acquainted and productive with Qt too.

Qt is a very mature, complete and well designed toolkit. Personally, I consider it a lot better than wxWidgets, yet I'm more used to the latter. Actually, I never finished Qt's tutorial :P

As you can see, switching to Qt wouldn't be easy, and it would take a huge amount of time to do it. It would also imply forcing the developers to learn that other toolkit, or saying "bye-bye" to them. Just try to imagine what it would be like if a new announcement came out saying that RC3 would be delayed because we're migrating the application to another toolkit :lol: (no, we don't have a release date yet)

Code::Blocks will most likely continue using wxWidgets, but improving Qt support is highly appreciated :wink:

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: My pretty Qt!
« Reply #7 on: September 18, 2007, 07:04:02 pm »
Quote from: incorrect user
By the way, who knows why C::B is not based on Qt,but on wxWidgets???Is the last one better?

Quite simple: when Code::Blocks' development started Qt wasn't an option. One of the focuses of this IDE was, and still is, to be crossplatform. The problem is that only Qt 3 was available then, and the license it had for Windows wasn't helpful at all (only commercial license).

Ceniza is right. Another reason was that Qt apps didn't use (don't know if they do now) the native toolkit for each platform which also made it a no-no.
Be patient!
This bug will be fixed soon...

Offline incorrect user

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: My pretty Qt!
« Reply #8 on: September 18, 2007, 10:12:49 pm »
Thanks to everybody who answered on my request! Please, go on to post your thoughts about advanced Qt using and how the C::B can help you in it here. Let's discuss them together guys! ;)

Waiting on new ideas...
Take quality as a rule!

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: My pretty Qt!
« Reply #9 on: September 19, 2007, 08:55:00 am »
... Qt apps didn't use (don't know if they do now) the native toolkit for each platform which also made it a no-no.

They still don't. Both Windows and Mac native toolkits are emulated (in Linux Qt *is* a "native" toolkit).
Life would be so much easier if we could just look at the source code.

Offline incorrect user

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: My pretty Qt!
« Reply #10 on: September 19, 2007, 01:44:06 pm »
... Qt apps didn't use (don't know if they do now) the native toolkit for each platform which also made it a no-no.

They still don't. Both Windows and Mac native toolkits are emulated (in Linux Qt *is* a "native" toolkit).

Could you please explaine what do you mean under "native toolkits"?
Take quality as a rule!

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: My pretty Qt!
« Reply #11 on: September 19, 2007, 01:49:08 pm »
Could you please explaine what do you mean under "native toolkits"?

As used here I think it is used to say the "Look and Feel" does not change to match the native OS "Look and Feel"

In other words an wxMSW/wxWidgets app looks like an MS Windows app, but an QT app does not.

Edit: From your links below QT has a much better native "Look and Feel" than GTK+ does.

I have never used QT, but I do run some GTK+ apps under windows.

Tim S
« Last Edit: September 19, 2007, 02:01:15 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline incorrect user

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: My pretty Qt!
« Reply #12 on: September 19, 2007, 01:54:03 pm »
Ok, but see http://trolltech.com/products/qt/features/index
it says that "Qt applications run natively - indistinguishable from native applications - compiled from a single source code-base on all major platforms" and "Using Qt delivers true platform independence - code once and deploy anywhere. Targeting a new platform demands little more than a simple recompile of a single source code-base"

I just think i've not understood mandrav and yop correctly...

By the way, you can see their screenshots also
« Last Edit: September 19, 2007, 01:58:09 pm by incorrect user »
Take quality as a rule!

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: My pretty Qt!
« Reply #13 on: September 19, 2007, 03:17:45 pm »
Ok, but see http://trolltech.com/products/qt/features/index
it says that "Qt applications run natively - indistinguishable from native applications - compiled from a single source code-base on all major platforms" and "Using Qt delivers true platform independence - code once and deploy anywhere. Targeting a new platform demands little more than a simple recompile of a single source code-base"

I just think i've not understood mandrav and yop correctly...

By the way, you can see their screenshots also

Well QT and wxWidgets almost do the same job. Many people prefer wxWidgets because is free for comercial applications, and for independent and small teams of programmers willing to make some money for their knowledge is great.

Commercial support of QT is good as I have heard, but really expensive, and you have to paid for updates, and to use special parts of the code for commercial applications, while theres plenty documentation of wxWidgets.

I have never tried QT because I'm a programmer trying to make some money, not to spend it on costly tools. Also imagine, how programmers will make money if they don't make custom applications for companies. There are small companies that doesn't want to pay so much for an application. Here wxWidgets is a life saver.
For example:
QT license prices are thousands of dollars and you sell your program for $800 dollars, what are you gaining or how you can compete in price with others?

Also I have seen that QT on windows is not so fast than wxWidgets, I have work with scribus (a desktop publishing application made on qt) to make newspapers and is some kind of slow drawing graphics, but in the other part theres no desktop publishing software made on wxWidgets I think, so I'm not so sure about this.

Here is information of the different toolkits with small comparisons with wxWidgets:
http://www.wxwidgets.org/wiki/index.php/WxWidgets_Compared_To_Other_Toolkits

Hope you got another point of view!.

Edit:
it says that "Qt applications run natively

Answering that question, that means that the code is compiled into machine code, not like Java or .Net, that compiles to a intermediate language or byte code. Also that while running the application has the look and feel of windows and mac.
« Last Edit: September 19, 2007, 08:12:58 pm by JGM »

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: My pretty Qt!
« Reply #14 on: September 19, 2007, 03:32:52 pm »
Ok, but see http://trolltech.com/products/qt/features/index
it says that "Qt applications run natively - indistinguishable from native applications - compiled from a single source code-base on all major platforms" and "Using Qt delivers true platform independence - code once and deploy anywhere. Targeting a new platform demands little more than a simple recompile of a single source code-base"

I just think i've not understood mandrav and yop correctly...

Ok, but see http://trolltech.com/products/qt/features/index
it says that "Qt applications run natively - indistinguishable from native applications - compiled from a single source code-base on all major platforms" and "Using Qt delivers true platform independence - code once and deploy anywhere. Targeting a new platform demands little more than a simple recompile of a single source code-base"

I just think i've not understood mandrav and yop correctly...

I'm quoting the following from wxWiki.
Quote
Qt doesn't have true native ports like wxWidgets does. What we mean by this is that even though Qt draws them quite realistically, Qt draws its own widgets on each platform. It's worth mentioning though that Qt comes with special styles for Mac OS X and Windows XP that use native APIs (Appeareance Manager on Mac OS X, UxTheme on Windows XP) for drawing standard widget primitives (e.g. scrollbars or buttons) exactly like any native application. Event handling, the resulting visual feedback and widget layout are always implemented by Qt.

    * An approach similar to Qt's is achieved with wxUniversal.
    * It should be noted that on KDE and Qtopia platforms, Qt is the native GUI library.


Refer the following link for the pricing details.

Quote
http://trolltech.com/products/qt/licenses/pricing

The pricing is Per-Developer and Per-Platform basis. So even if you write a commercial application on Windows (And the source code compiles on Linux without a single change), in order to sell it's Linux version, you need to buy extra Licenses. The minimum License price starts at $1.7K+. As JGM wrote, even if it has benefits, smaller companies find wxWidgets to be better in Licensing respect.
« Last Edit: September 19, 2007, 03:36:38 pm by Biplab »
Be a part of the solution, not a part of the problem.

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: My pretty Qt!
« Reply #15 on: September 19, 2007, 03:49:53 pm »
Mm, 1700$? maybe for one platform...

I just purchased 4 Qt licenses for my team - the console edition (no GUI), costs us around 3300$ (!!) per developer (If we needed only 1 platform we would have used the OS API directly and not Qt)

Eran

Offline incorrect user

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: My pretty Qt!
« Reply #16 on: September 20, 2007, 09:27:25 am »
Hope you got another point of view!

Sorry, i didn't understand. You mean i need to learn more about wx and be sure that for some purposes it's better? I've understood that it's better to write the commercial software with wxWidgets. But C::B is free!
You see, i can't get the idea of mandrav: why it is not permitted to use not native events exchange code and widgets' drawing for cross-platform applications (in particulary C::B)??

P.S. No problem, i see that it's almost impossible to convert C::B for Qt, so, let it be so... :)
« Last Edit: September 20, 2007, 09:37:38 am by incorrect user »
Take quality as a rule!

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: My pretty Qt!
« Reply #17 on: September 20, 2007, 09:56:27 am »
Sorry, i didn't understand. You mean i need to learn more about wx and be sure that for some purposes it's better?

There are a large number of developers who uses wxWidgets. Don't assume they are morons. wxWidgets has been developed for last 15 years and it's a good alternative. It may not be the best toolkit in the world but definitely it's not a Toy toolkit to write only Hello-World applications.

You may like Qt. It's your choice. But that doesn't mean other toolkits are useless.

I've understood that it's better to write the commercial software with wxWidgets. But C::B is free!

Neither we did say that you should start writing commercial apps with wxWidgets nor we said that all Free apps should be written with Qt. It's a choice of the devs and C::B devs prefer wxWidgets.

You see, i can't get the idea of mandrav: why it is not permitted to use not native events exchange code and widgets' drawing for cross-platform applications (in particulary C::B)??

Because Qt has it's own event management system.

P.S. No problem, i see that it's almost impossible to convert C::B for Qt, so, let it be so... :)

Yes, I said it earlier. We'll not change it to Qt.
Be a part of the solution, not a part of the problem.

Offline incorrect user

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: My pretty Qt!
« Reply #18 on: September 20, 2007, 11:00:22 am »
Sorry, maybe i'm incorrect, but i really wonder about this:

Because Qt has it's own event management system.

So what?? How does it hinder the IDE? Maybe it would be just more slow, but i believe it isn't noticeable...


« Last Edit: September 20, 2007, 11:29:46 am by incorrect user »
Take quality as a rule!

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: My pretty Qt!
« Reply #19 on: September 20, 2007, 11:28:29 am »
Because Qt has it's own event management system.
So what?? How does it hinder the IDE?

Sorry, it was not the reply that you wanted.

Anyway, Non-native toolkits possesses Non-native look. This is not what we want. An Windows app looks more acceptable if it uses the Windows look'n-feel with which people are used to. Apart from that drawing a non-native control adds an extra processing overhead (Though unnoticeable for most common apps) on CPUs.
Be a part of the solution, not a part of the problem.

Offline incorrect user

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: My pretty Qt!
« Reply #20 on: September 20, 2007, 11:43:18 am »
No problem, Biplab! Thanks for your time and fast reaction! But it's your quotation:

 "It's worth mentioning though that Qt comes with special styles for Mac OS X and Windows XP that use native APIs (Appeareance Manager on Mac OS X, UxTheme on Windows XP) for drawing standard widget primitives (e.g. scrollbars or buttons) exactly like any native application."

And how do you think, will trolls from trolltech continue develop and upgrade their library for speed, visual style and so on? I certainly think they will! ;)

i will definitely find out all accessible information about wx and perhaps change my opinion about it's usefulness, but now i firmly believe that Qt is easier and "righteouser"!

BTW, very useful thing for each wxWidgets developer:
Download free "Cross-Platform GUI Programming with wxWidgets"

http://www.phptr.com/content/images/0131473816/downloads/0131473816_book.pdf

« Last Edit: September 20, 2007, 11:59:01 am by incorrect user »
Take quality as a rule!

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: My pretty Qt!
« Reply #21 on: September 20, 2007, 05:17:15 pm »
Sorry, i didn't understand. You mean i need to learn more about wx and be sure that for some purposes it's better?

What I mean is that many people who develop commercial applications using wxWidgets, in free time they also develop free software. Instead of acquiring new knowledge and use QT they use their previous knowledge using wxWidgets.

Thats an example. Take for example Linus Torvalds,  he started linux for free but he also works on commercial projects as I know, And I'm sure that he use some free software like wxWidgets. Just an example, don't take it for real

Sometimes is difficult to learn so many things (time consuming) that we use our current knowledge.
« Last Edit: September 20, 2007, 09:32:21 pm by JGM »

Offline incorrect user

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: My pretty Qt!
« Reply #22 on: September 20, 2007, 10:49:16 pm »
I'm positive, JGM! Though, concerning Linus i'm not agree: just read his book named "Just for fun" it's quite interesting!

Regards, incorrect user :)
Take quality as a rule!

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: My pretty Qt!
« Reply #23 on: October 09, 2007, 04:18:48 pm »
Also I have seen that QT on windows is not so fast than wxWidgets, I have work with scribus (a desktop publishing application made on qt) to make newspapers and is some kind of slow drawing graphics, but in the other part theres no desktop publishing software made on wxWidgets I think, so I'm not so sure about this.

Wow the new cross platform Xara Xtreme is been developed using wxWidgets, I have tested it and it works great!

Quote from: xaraxtreme.org link=http://www.xaraxtreme.org/download/
you should be able to build Xara LX for any Linux platform that supports wxWidgets, and gcc version 3.4.0 or later