[Qt-interest] Qt-interest Digest, Vol 8, Issue 65

Prashant prashant.me at gmail.com
Thu Jul 21 09:02:04 CEST 2011


Refer to qstetrix example. In the example it is using a nice hack to shove
in the qt namespace basically applying the static function
staticQtMetaObject.
HTH,
Prashant.

On Thu, Jul 21, 2011 at 12:57 AM, <qt-interest-request at qt.nokia.com> wrote:

> Send Qt-interest mailing list submissions to
>        qt-interest at qt.nokia.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.qt.nokia.com/mailman/listinfo/qt-interest
> or, via email, send a message with subject or body 'help' to
>        qt-interest-request at qt.nokia.com
>
> You can reach the person managing the list at
>        qt-interest-owner at qt.nokia.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Qt-interest digest..."
>
>
> Today's Topics:
>
>   1. Re: error handling patterns with regard to (qt) gui
>      programming (Alan Ezust)
>   2. Re: error handling patterns with regard to (qt) gui
>      programming (Thiago Macieira)
>   3. Re: error handling patterns with regard to (qt) gui
>      programming (Paul Miller)
>   4. Re: QUiLoader's method "load" used in custom widget       results
>      in "Segmentation fault" in Linguist (Friedemann Kleint)
>   5. How to unsubscribe???? (???)
>   6. Re: How to unsubscribe???? (Bo Thorsen)
>   7. Using Qt Enums in QtScripts (Jordan Upham)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 20 Jul 2011 06:55:27 -0700
> From: Alan Ezust <alan.ezust at gmail.com>
> Subject: Re: [Qt-interest] error handling patterns with regard to (qt)
>        gui     programming
> To: Matthias Dahl <ml_qt-interest at binary-island.eu>
> Cc: qt-interest at qt.nokia.com
> Message-ID:
>        <CALy5K9rxhxR7K2ZE+gr-EKL8fD1GJ+3iAw3_ki6vC+jiqYqQtQ at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> You should not open up message dialogs directly from libraries, but you can
> use
> things like qFatal, qCritical, qWarning, and qDebug() to send your
> messages,
> and you can decide how they are displayed (either with GUI or with a
> console
> message, or
> a log file), by installing an error handler.
>
> See the API docs for qInstallMsgHandler.
>
>
> On Tue, Jul 19, 2011 at 10:13 AM, Matthias Dahl <
> ml_qt-interest at binary-island.eu> wrote:
>
> > Hello everyone.
> >
> > Coming from a more server/client related background where I had to write
> > tools,
> > clients and servers (with some very nice detours to graphics
> programming),
> > I've
> > just recently made the serious step up to gui programming and I've been
> >  asking
> > myself ever since if any good design patterns exist for  error  handling
> > within
> > a gui program.
> >
> > I've read mostly that one should prefer lower level error handling
> because
> > that
> > is where most informations about the error are available. Yet I find it
> > hard to
> > open a QErrorMessage in some GUI unrelated part of the code where for
> > example a
> > database connection is handled.
> >
> > Throwing exceptions is naturally partly a way out. But imho exceptions
> are
> > only
> > for serious or fatal problems and not a general solution. That and
> there's
> > also
> > the possible performance impact and the usual (design) pitfalls.
> >
> > So I'd like to ask how you guys handle errors in your own programs?   Are
> > there
> > any commonalities or patterns you follow? Or maybe some tips?
> >
> > Thanks a lot in advance for the input...
> >
> > So long,
> > matthias
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at qt.nokia.com
> > http://lists.qt.nokia.com/mailman/listinfo/qt-interest
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.qt.nokia.com/pipermail/qt-interest/attachments/20110720/807464d1/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Wed, 20 Jul 2011 11:07:22 -0300
> From: Thiago Macieira <thiago at kde.org>
> Subject: Re: [Qt-interest] error handling patterns with regard to (qt)
>        gui     programming
> To: qt-interest at qt.nokia.com
> Message-ID: <1353920.CvyfDgMIyZ at doriath>
> Content-Type: text/plain; charset="us-ascii"
>
> On Wednesday, 20 de July de 2011 06:55:27 Alan Ezust wrote:
> > You should not open up message dialogs directly from libraries, but you
> can
> > use
> > things like qFatal, qCritical, qWarning, and qDebug() to send your
> messages,
> > and you can decide how they are displayed (either with GUI or with a
> > console message, or
> > a log file), by installing an error handler.
>
> +1 on that.
>
> What is the end-user going to do with an error message that says the SQL
> query
> was malformed?
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>      PGP/GPG: 0x6EF45358; fingerprint:
>      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 190 bytes
> Desc: This is a digitally signed message part.
> Url :
> http://lists.qt.nokia.com/pipermail/qt-interest/attachments/20110720/8110a0e1/attachment-0001.bin
>
> ------------------------------
>
> Message: 3
> Date: Wed, 20 Jul 2011 09:29:53 -0500
> From: Paul Miller <paul at fxtech.com>
> Subject: Re: [Qt-interest] error handling patterns with regard to (qt)
>        gui programming
> To: qt-interest at qt.nokia.com
> Message-ID: <4E26E661.2040901 at fxtech.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 7/19/2011 12:13 PM, Matthias Dahl wrote:
> > Throwing exceptions is naturally partly a way out. But imho exceptions
> are only
> > for serious or fatal problems and not a general solution. That and
> there's also
> > the possible performance impact and the usual (design) pitfalls.
>
> Hitting your database is going to be a million times slower than using
> exceptions - using them will not incur any appreciable performance
> penalty on your program. Don't worry about it.
>
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 20 Jul 2011 16:57:21 +0200
> From: Friedemann Kleint <Friedemann.Kleint at nokia.com>
> Subject: Re: [Qt-interest] QUiLoader's method "load" used in custom
>        widget  results in "Segmentation fault" in Linguist
> To: qt-interest at qt.nokia.com
> Message-ID: <201107201657.21164.Friedemann.Kleint at nokia.com>
> Content-Type: Text/Plain;  charset="iso-8859-15"
>
> Hi,
>
> > I'm writing an interface program and it came time to internationalize it,
> > so I started reading the Qt Documentation. I was happy to see that all
> > forms loaded by QUiLoader are automatically translated, but I stumbled on
> > a problem. Almost the whole interface consists of custom widgets that are
> > put in the forms from designer. Some of the custom widgets use their own
> > forms that they load using QUiLoader class and here the problem appeared.
> > When I start Linguist and choose a translation that is located on a form
> > that uses some of my custom widgets the program ends with "Segmentation
> > Fault".
>
> The issue is currently that  libQtUiTools.a is a statically linked library
> that gets linked against the Designer plugin and Linguist (or any other
> application using QUiLoader). libQtUiTools.a contains static data whose
> instances apparently clash when using some compilers.
> This was changed in the Qt 5 development branch.
>
> Generally, we recommend against using QUiLoader for custom widgets, though.
> Alternatively, you could use the code uic generates for the custom widget,
> streamline it a bit and use it in the custom widget constructor.
>
> Regards,
> Friedemann
> --
> Friedemann Kleint
> Nokia, Qt Development Frameworks
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 20 Jul 2011 23:10:12 +0800
> From: ??? <yuxiaoyang at sf-auto.com>
> Subject: [Qt-interest] How to unsubscribe????
> To: "qt-interest at qt.nokia.com" <qt-interest at qt.nokia.com>
> Message-ID:
>        <FBD6D0AFC80A504BB07E242ADFA2D35286E691D8D7 at MAILSERVER.sfdomain.com
> >
> Content-Type: text/plain; charset="gb2312"
>
> I neet  not  qt mail list now.  How can I unsubscribe it?
> Thanks.
>
>
> ________________________________
> ????????????????????????????????
> ??????????????????????????????????????????
> This email and its attachments may be confidential and are intended solely
> for the use of the individual to whom it is addressed.
> If you are not the intended recipient of this email and its attachments,
> you must take no action based upon them, nor must you copy or show them to
> anyone. Please contact the sender if you believe you have received this
> email in error.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.qt.nokia.com/pipermail/qt-interest/attachments/20110720/cde642f2/attachment-0001.html
>
> ------------------------------
>
> Message: 6
> Date: Wed, 20 Jul 2011 17:43:47 +0200
> From: Bo Thorsen <bo at fioniasoftware.dk>
> Subject: Re: [Qt-interest] How to unsubscribe????
> To: qt-interest at qt.nokia.com
> Message-ID: <4E26F7B3.2010909 at fioniasoftware.dk>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Den 20-07-2011 17:10, ??? skrev:
> > I neet not qt mail list now. How can I unsubscribe it?
>
> At the bottom of every mail you can see this:
>
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at qt.nokia.com
> > http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
> Follow that link.
>
> Bo Thorsen,
> Fionia Software.
>
> --
>
> Expert Qt and C++ developer for hire
> Contact me if you need expert Qt help
> http://www.fioniasoftware.dk
>
>
> ------------------------------
>
> Message: 7
> Date: Wed, 20 Jul 2011 15:26:45 -0400
> From: Jordan Upham <jupham at zipitwireless.com>
> Subject: [Qt-interest] Using Qt Enums in QtScripts
> To: qt-interest at trolltech.com
> Message-ID:
>        <CAA7OQ9ggoUCQPz_8vg_tbDiJ=5UV9p_wZbH=oUsP=p6nsxCxAg at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> I'm looking to script an embedded application and I want to generate key
> events.  I was wondering if it is possible to get at Qt's Key enum so that
> I
> do not have to make some mapping for each key.  From the documentation I
> can
> find that it looks like this is possible by using a some meta object.  What
> I'm not sure of is the code to do this in c++ and how to access it in the
> qt
> script.  Any help would be appreciated.
>
> Thanks
> Jordan Upham
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.qt.nokia.com/pipermail/qt-interest/attachments/20110720/57a151be/attachment.html
>
> ------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
> End of Qt-interest Digest, Vol 8, Issue 65
> ******************************************
>



-- 
Prashant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110721/f093ac7c/attachment.html 


More information about the Qt-interest-old mailing list