Re: [Interest] Create the main widget on heap in main()

2014-01-11 Thread devbean
Great, I almost forget it. Thank you very much. Sent from myMail for iOS 2014年1月11日 星期六 21:28 +0800 from 程梁 : I can't agree Oliver anymore. I believe some code seems OK does not means you should write in that way (just think about business flow control using exception, it's OK, but you shoul

Re: [Interest] Add-in can't register help in VS2012

2014-01-11 Thread Bob Hood
Nevermind. Launching it with "Run as Administrator" seems to have addressed the issue (even though I am already running in the "Administrator" account). On 1/11/2014 8:54 AM, Bob Hood wrote: > I'm getting: > > "Cannot register qt VS2012 help! (error code: 101)" > "Cannot register qt5vs VS2012 he

[Interest] Add-in can't register help in VS2012

2014-01-11 Thread Bob Hood
I'm getting: "Cannot register qt VS2012 help! (error code: 101)" "Cannot register qt5vs VS2012 help! (error code: 101)" when I attempt to install the Qt5 Visual Studio Add-in (1.2.2) into VS2012 Update 4. Any ideas what might be causing that? ___ Inter

Re: [Interest] Create the main widget on heap in main()

2014-01-11 Thread Constantin Makshin
It may be useful to remind that while the OS will destroy the process' heap, it won't call any destructors (simply because it knows nothing about them), creating a non-zero chance that some resources may not be cleaned up properly. On Jan 11, 2014 4:54 PM, "Till Oliver Knoll" wrote: > Am 11.01.20

Re: [Interest] Create the main widget on heap in main()

2014-01-11 Thread 程梁
I can't agree Oliver anymore. I believe some code seems OK does not means you should write in that way (just think about business flow control using exception, it's OK, but you should not do so). Now I knew it's OK but I'll still tell my blog readers it does not recommand to do so. :-) Thank you

Re: [Interest] Create the main widget on heap in main()

2014-01-11 Thread Till Oliver Knoll
Am 11.01.2014 um 13:30 schrieb Etienne Sandré-Chardonnal : > 2014/1/11 Constantin Makshin >> True, but why would one need a parented object in main()? :-) >> > > True, but an object that should be deleted at the last line of main but is > not by mistake is a non-leak :) Technically it is.

Re: [Interest] Create the main widget on heap in main()

2014-01-11 Thread Etienne Sandré-Chardonnal
2014/1/11 Constantin Makshin > True, but why would one need a parented object in main()? :-) > True, but an object that should be deleted at the last line of main but is not by mistake is a non-leak :) The process heap is deleted anyway... I've seen already several crashes due to QObjects on st

Re: [Interest] Create the main widget on heap in main()

2014-01-11 Thread Scott Aron Bloom
In general, where I have had heap based objects in main, is not for the main application, but for test applications… Or for when the object under test/use, is created via a shared library, and its interface returns the pointer. Scott From: interest-bounces+scott.bloom=onshorecs@qt-project.o

Re: [Interest] Create the main widget on heap in main()

2014-01-11 Thread Constantin Makshin
True, but why would one need a parented object in main()? :-) On Jan 11, 2014 3:13 PM, "Etienne Sandré-Chardonnal" wrote: > QObjects with a parent should never be allocated on stack (otherwise, you > delete them twice) > > > 2014/1/11 Constantin Makshin > >> Saving some stack space may make sens

Re: [Interest] Create the main widget on heap in main()

2014-01-11 Thread Constantin Makshin
Saving some stack space may make sense on mobile platforms, but in general yes, creating objects on the heap in main() is pretty much the same thing as creating them on the stack. On Jan 11, 2014 2:02 PM, "Alejandro Exojo" wrote: > El Saturday 11 January 2014, 程梁 escribió: > > Yes, I tought there

Re: [Interest] Create the main widget on heap in main()

2014-01-11 Thread Alejandro Exojo
El Saturday 11 January 2014, 程梁 escribió: > Yes, I tought there is no any problem about this sample demo. But is there > any posibility when the application is large? According to your words I > don't see any problem about creating the main widget on heap because the > main event loop will close al

Re: [Interest] 回复: Does isGrayscale() can tell whether a color imagecan safely be converted to a grayscale image?

2014-01-11 Thread Constantin Makshin
Well, then you have a choice: 1) look at the source code of these methods; 2) implement the coversion safety check yourself, the one discussed in this this thread is quite trivial. :-) On Jan 11, 2014 1:48 PM, "iMath" <2281570...@qq.com> wrote: > but I think the fact is that "they could be used t

[Interest] ?????? Does isGrayscale() can tell whether a color imagecan safely be converted to a grayscale image?

2014-01-11 Thread iMath
but I think the fact is that "they could be used to tell whether a color image can safely be converted to a grayscale image." -- -- ??: "Constantin Makshin";; : 2014??1??11??(??) 5:27 ??: "Qt Interest"; : Re: [Interest] Do

[Interest] changes to the model is not applied to the database.

2014-01-11 Thread iMath
After setting up a table model in the following code: http://codepad.org/nAUt68p1 changes to the model is not applied to the database. In eric python IDE(In other IDE may not found this error),after edited the data item,it shows the following error: QSqlQuery::value: not positioned on a valid

Re: [Interest] Does isGrayscale() can tell whether a color image can safely be converted to a grayscale image?

2014-01-11 Thread Constantin Makshin
My opinion is that there's no need for those methods descriptions to duplicate information already provided in the class documentation. On Jan 11, 2014 12:27 PM, "iMath" <2281570...@qq.com> wrote: > In the Image Formats part of QImage doc says > " > The allGray() and isGrayscale() functions tell w

[Interest] Does isGrayscale() can tell whether a color image can safely be converted to a grayscale image?

2014-01-11 Thread iMath
In the Image Formats part of QImage doc says " The allGray() and isGrayscale() functions tell whether a color image can safely be converted to a grayscale image. " but in the doc of there 2 functions indicate they're used to decide whether an image is grayscale image ,not mentioned they could be