Author Topic: My pretty Qt!  (Read 13774 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.