Jump to content

  • Log In with Google      Sign In   
  • Create Account


Quick QT question


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 Aliii   Members   -  Reputation: 1412

Like
0Likes
Like

Posted 06 January 2013 - 07:58 PM

Is QT free on Windows? If yes, then can I sell the stuff I made using QT?

Sorry, I googled it but I couldnt find a clear answer. Thanks!



Sponsor:

#2 Cornstalks   Crossbones+   -  Reputation: 6974

Like
2Likes
Like

Posted 06 January 2013 - 08:11 PM

If by QT you mean Qt (the lower-case "t" is significant, and gives it the pronunciation "cute"), the answer is yes (to both questions), so long as you properly abide by the LGPL. You can also buy a commercial license of Qt, but that's not required to sell your application.

If by QT you mean QuickTime, I'm not exactly sure, seeing as they provide several licenses and I'm too lazy to read them (and hunt down any Windows specific things).


Edited by Cornstalks, 06 January 2013 - 08:12 PM.

[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#3 Servant of the Lord   Crossbones+   -  Reputation: 17960

Like
1Likes
Like

Posted 06 January 2013 - 08:39 PM

Seconding what Cornstalks said, Qt the cross-platform windowing API is dual-licensed under LGPL, which means you can use it commercially under the LGPL's licensing requirements. You don't need to license your own code under LGPL either.

 

You're basically safe with LGPL if you: Link to Qt as a DLL (instead of statically linking) [1], don't modify Qt itself [2], distribute the Qt license with your project [3] and link to where others can download Qt [4].

 

I am not a laywer, so take my misunderstandings with a grain of thionite:

[1] I think FSF is working this ambiguity out, but until they do, it's a legal liability unless you sublicense your code under LGPL as well.

[2] Unless you clearly state you are using a modified version, and you make sure the modified sources are available and you license the Qt modifications under LGPL.

[3] You aren't licensing your project under LGPL, you are saying the Qt part is licensed under LGPL. Make sure you make that clear to end-users so they aren't confused.

[4] You are required to make LGPL licensed software (Qt in this case) source code available so others can recompile the DLLs. In practice, just linking to the Qt website is fine.

 

It's really one of the best open source licenses that permit commercial usage - only really liberal licenses like MIT/zlib/PNG license are better, from a commercial developer standpoint.

 

[Edit:] Qt used to not be free on Windows, but has been LGPL'd since 2009. Late last year, the previously corporate-managed API has now been transferred over the a community-run management structure with corporate assistance and backing. It's LGPL and permanently and legally irrevocably so - you are safe with it, even commercially. Just make sure you download the framework and IDE from qt-project.org, instead of from the commercially-licensed package that will cost you money (because it comes with commercial developer support).


Edited by Servant of the Lord, 06 January 2013 - 08:44 PM.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.

[Fly with me on Twitter] [Google+] [My broken website]

All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.                                                                                                                                                            [Need web hosting? I personally like A Small Orange]
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal


#4 Aliii   Members   -  Reputation: 1412

Like
0Likes
Like

Posted 07 January 2013 - 05:40 AM

Yes, I mean the cross-platform API Qt. Sorry

Thanks for the answers!

I think Im going to use it with C++ and OpenGL. I hope it has no effect on performance



#5 Servant of the Lord   Crossbones+   -  Reputation: 17960

Like
2Likes
Like

Posted 07 January 2013 - 11:41 AM

I think Im going to use it with C++ and OpenGL. I hope it has no effect on performance

 

It has a big effect on performance, actually (if using the Widget system). These kind of APIs are designed for regular non-game applications, and the whole way the API is laid out goes contrary to the whole way most games are laid out. Games have infinite loops of: handle events, update, draw as fast as you can. Applications have infinite loops of: react to events, with the events sometimes telling the GUI to redraw itself.

 

Games are designed to run as fast as possible, with thousands and millions of objects needing constant updating, where applications are designed to sleep as much as possible, and only updating one or two objects when they are interacted with.

 

You can still make games with Qt and OpenGL, you just need to be aware of the performance effects. If you're making something simple, you probably won't notice any slowdown (though you'll notice the extreme difference in architecture), but once you start having more performance-critical requirements, you might bump against it. It's unfortunate, because Qt would otherwise be very useful for game GUIs (since you use CSS to skin the widgets). One of these days someone needs to modify Qt and make a version that is game-friendly. ([Edit:] Apparently some people are: Qt Game Enabler and Qt Game API - but I'm not sure how stable and active they are

 

My game, which is a simple 2D game, using Qt for the editor but SFML for the game. I hope to get it so I can compile Qt entirely out of the code (and only use SFML) for when releasing the game, and only use Qt in the version of the game with the built-in editor.

 

See this thread and this thread and this blog entry to form your own opinions about Qt.

Note, I'm not saying Qt is bad. It's an excellent API. It's just not designed with games in mind, and if you want to use it for games you need to be aware of the shortcomings and decide whether the pros are worth the cons, or how to work around those shortcomings (I believe they can be worked around, but it'll take some work).


Edited by Servant of the Lord, 07 January 2013 - 11:42 AM.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.

[Fly with me on Twitter] [Google+] [My broken website]

All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.                                                                                                                                                            [Need web hosting? I personally like A Small Orange]
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal


#6 SimonForsman   Crossbones+   -  Reputation: 5952

Like
2Likes
Like

Posted 07 January 2013 - 12:57 PM

<blockquote class="ipsBlockquote" data-author="Servant of the Lord" data-cid="5018651"><p><br /></p><blockquote class="ipsBlockquote" data-author="Aliii" data-cid="5018555"><p>I think Im going to use it with C++ and OpenGL. I hope it has no effect on performance</p></blockquote> <br />It has a big effect on performance, actually (if using the Widget system). These kind of APIs are designed for regular non-game applications, and the whole way the API is laid out goes contrary to the whole way most games are laid out. Games have infinite loops of: handle events, update, draw as fast as you can. Applications have infinite loops of: react to events, with the events sometimes telling the GUI to redraw itself.<br /> <br />Games are designed to run as fast as possible, with thousands and millions of objects needing constant updating, where applications are designed to sleep as much as possible, and only updating one or two objects when they are interacted with.<br /> <br />You can still make games with Qt and OpenGL, you just need to be aware of the performance effects. If you're making something simple, you probably won't notice any slowdown (though you'll notice the extreme difference in architecture), but once you start having more performance-critical requirements, you might bump against it. It's unfortunate, because Qt would otherwise be very useful for game GUIs (since you use CSS to skin the widgets). One of these days someone needs to modify Qt and make a version that is game-friendly. (<span style="font-size:10px;"><strong>[Edit:]</strong> Apparently some people are: <a data-cke-saved-href="http://projects.developer.nokia.com/qtgameenabler" href="http://projects.developer.nokia.com/qtgameenabler">Qt Game Enabler</a> and <a data-cke-saved-href="http://harmattan-dev.nokia.com/docs/library/html/libqtgameopengles2/main.html?tab=1" href="http://harmattan-dev.nokia.com/docs/library/html/libqtgameopengles2/main.html?tab=1">Qt Game API</a> - but I'm not sure how stable and active they are</span>) <br /> <br />My game, which is a simple 2D game, using Qt for the editor but SFML for the game. I hope to get it so I can compile Qt entirely out of the code (and only use SFML) for when releasing the game, and only use Qt in the version of the game with the built-in editor.<br /> <br />See <a data-cke-saved-href="http://www.gamedev.net/topic/628049-qt-c-mmorpg/" href="http://www.gamedev.net/topic/628049-qt-c-mmorpg/">this thread</a> and <a data-cke-saved-href="http://www.gamedev.net/topic/625708-use-qt-something-else-or-roll-my-own/" href="http://www.gamedev.net/topic/625708-use-qt-something-else-or-roll-my-own/">this thread</a> and <a data-cke-saved-href="http://www.shamusyoung.com/twentysidedtale/?p=15904" href="http://www.shamusyoung.com/twentysidedtale/?p=15904">this blog entry</a> to form your own opinions about Qt.<br />Note, I'm not saying Qt is bad. It's an excellent API. It's just not designed with games in mind, and if you want to use it for games you need to be aware of the shortcomings and decide whether the pros are worth the cons, or how to work around those shortcomings (I believe they <u>can</u> be worked around, but it'll take some work).<br /><p><br /></p></blockquote><br />Those game APIs are for mobiles, a plain QGLWidget with the makeCurrent on each frame crap removed doesn't add any real slowdown compared to a Win32 or SFML window.<br /><br />The big problem with using QT really is that the vast majority of the API is unusable for games and thus redundant. (You still have to ship a whole bunch of rather large dlls)

For an editor where the UI elements are outside the GL widget performance will be more than good enough, just don't put other widgets inside the GL widget.

Edited by SimonForsman, 07 January 2013 - 01:29 PM.

I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#7 Servant of the Lord   Crossbones+   -  Reputation: 17960

Like
0Likes
Like

Posted 07 January 2013 - 01:31 PM

Thanks for the intel about the 3rd party adaptations being mobile.

 

For an editor where the UI elements are outside the GL widget performance will be more than good enough, just don't put other widgets inside the GL widget.

 

Putting UI elements inside the game window is exactly what most games will be wanting. Putting them outside the game window is, as you mentioned, fine for editors.


It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.

[Fly with me on Twitter] [Google+] [My broken website]

All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.                                                                                                                                                            [Need web hosting? I personally like A Small Orange]
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal


#8 Aliii   Members   -  Reputation: 1412

Like
0Likes
Like

Posted 07 January 2013 - 02:46 PM

Thanks! Im using winapi as little as possible, like creating the opengl window, get the system time, input handling ....and thats it. If I could replace this with something cross-platform(and stable) that would be nice. In the game I have my own menus and Its running on fullscreen(thats why I assumed that it wont really affect the performance), but I have an editor too which needs more:)

 

 

you'll notice the extreme difference in architecture

 

What do you mean? Cant I just include the headers and use the API calls?

 

 

 

You still have to ship a whole bunch of rather large dlls

 

 

Like how large?smile.png

Thanks!



#9 Cornstalks   Crossbones+   -  Reputation: 6974

Like
0Likes
Like

Posted 07 January 2013 - 02:54 PM

You still have to ship a whole bunch of rather large dlls

 

Like how large?smile.png

11.2 MB total for the QtCore4.dll and QtGui4.dll on my system. If you use various extensions or optional packages in Qt I wouldn't be surprised if there might be some extra DLLs you need.


[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#10 Servant of the Lord   Crossbones+   -  Reputation: 17960

Like
0Likes
Like

Posted 07 January 2013 - 03:26 PM

Thanks! Im using winapi as little as possible, like creating the opengl window, get the system time, input handling ....and thats it. If I could replace this with something cross-platform(and stable) that would be nice. In the game I have my own menus and Its running on fullscreen(thats why I assumed that it wont really affect the performance), but I have an editor too which needs more:)

Well, if you need widgets, use Qt. If you don't need widgets, I would suggest SFML.
 

you'll notice the extreme difference in architecture

What do you mean? Cant I just include the headers and use the API calls?

The Win32 architecture is quite a bit different than Qt's architecture.

It's not that you can't call the API functions, it's that the execution flow of the functions are different so you can't just swap things out one for one. The higher level architecture of different libraries can follow different styles of thought. Qt is signal-and-slot and event-based (not one or the other, but both simultaneously), Win32 is only event-based.
 

You still have to ship a whole bunch of rather large dlls

Like how large?smile.png

If you don't accidentally ship the debug libraries, some some foolish programmers (it was an accident!), in Qt5 you'll just ship Qt5Core.dll (4.39mb), Qt5Gui.dll (3.77mb), and QtWidgets.dll (5.62mb). You can add the Qt OpenGL module with Qt5OpenGL.dll for only 382 kb. There are additional modules that can increase things further (like the Webkit module which is over 20 mb).

For comparison, SFML's five DLLs are a total of 1.67 mb with another 2.6 DLLs of dependencies for less than 5mb total.
Whether DLL size is a problem or not depends on your project - but it's probably nothing to worry about.


It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.

[Fly with me on Twitter] [Google+] [My broken website]

All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.                                                                                                                                                            [Need web hosting? I personally like A Small Orange]
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS