[Interest] Usable Qt [Was: download a file form http]

Jason H scorp1us at yahoo.com
Thu Jul 5 16:08:57 CEST 2012


The problem was an advanced user told you about the #include moc hack.

It is not needed, or encouraged and is used by advanced developers to provide a SINGLE file example. In standard fashion, you'd have multiple files. I've only used the hack a few times myself, and you'd probably have realized it after a while of working with Qt. 





________________________________
 From: Sivan Greenberg <sivan at omniqueue.com>
To: Tony Rietwyk <tony at rightsoft.com.au> 
Cc: interest at qt-project.org 
Sent: Thursday, July 5, 2012 5:32 AM
Subject: [Interest] Usable Qt [Was: download a file form http]
 
Thanks Tony. With your help, is there a way to download a file using
Qt, remain dependent only on Qt, and support multiple targets without
having to create your own custom build scripts, reading qmake's code,
finding alternative build system, reading QNAM's code (which I
actually did) , spawning a python subprocess to do the actual
downloading, and so forth?

I'd  really just like to concentrate on my application logic and have
a demo that downloads one file from a web service[0] real quick e.g.
"rapid prototyping and POC". Perhaps this way of using Qt is not in
par with the framework's nature and design; read: one has to become a
Qt expert for a few years before achieving such a task?

Or perhaps, and this is very valid argument, Qt is for those who
really know what they are doing, and given my questions- I certainly
do not, so should I revert to use Python/GTK which is my original
expertise?

Now, I am genuinely asking to create discussion and try to improve -
If this is usable by others, I'd love us to think up a class for
"humane" interface and be interested in contributing it (e.g. more
high level operations like WebDAV/REST web or similar to)  to network
operations which are now days pivotal in importance given cloud
technology takes over.

If Qt is not suitable for rapid prototyping, then I apologize for the
noise, but I think if Qt is to survive forward we must follow suite
with the rest of the industry and make network operations as easy[1]
as creating a widget, IMHO. In general we need to make the common
stuff easy, and the complex possible[2].

That is if we claim to provide a "Generic application development
framework that enables you to code once, deploy everywhere". There is
no issue in being a niche technology with limited focus, but we must
communicate this loudly and strongly so people making business
decision upon our code will know exactly what they are "paying" or be
able to pay only for what they eat[3].

Also note, that drilling Google does not come with useful snippets to
use, but then you could argue someone has to know how to use Google as
well...

If my tone sounds a bit harsh, or inappropriate I do apologize as
everybody around here knows how much I absolutely love this project,
its people and community and defend it furiously  myself against Nay
Sayers that approached me with this exact issue and argument. But I do
believe, that if we are to survive to next years of computing this
kind of discussions and re-steering of the bowl by "new blood" in the
community is crucial for the future.

Thanks for you attention, and sorry for the long email!

-Sivan
----

[0]: https://gitorious.org/cquick#more

[1]: Downloading a file in python:
'import urllib
urllib.urlretrieve ("http://www.example.com/songs/mp3.mp3", "mp3.mp3")'

[2]: http://en.wikipedia.org/wiki/Perl_6#History
"In Perl 6, we decided it would be better to fix the language than fix
the user" -Larry Wall. (reading the whole "History" paragraph would
bring more insight so is a *very* recommended read).

[3]: http://docs.pylonsproject.org/projects/pyramid/en/1.0-branch/narr/introduction.html
"Pyramid takes a “pay only for what you eat” approach. This means that
you can get results even if you have only a partial understanding of
Pyramid."
In that sense, I do not want to have to be HTTP and network expert to
be able to download a file.


On Thu, Jul 5, 2012 at 11:41 AM, Tony Rietwyk <tony at rightsoft.com.au> wrote:
>> Sent: Thursday, 5 July 2012 6:03 PM
>>
>> Thanks for all of the replies, how do I then make the MOC step happen
>> before everything else in Qt creator or by plainly using qmake?
>> (letting qmake "do the right thing" did not work).
>>
>> Thanks again!
>>
>> -Sivan
>
> It depends on your tool-chain, and how you created the build scripts.
>
> I use hand-edited .pro (and .pri) files, and run qmake to generate Visual
> Studio  and Xcode project files.
>
> There is an option for qmake to create a .pro file, but I've never used it.
>
> Tony.
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



-- 
-Sivan
_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120705/c640c21c/attachment.html>


More information about the Interest mailing list