Re: [Interest] Windows application runs with console window

2013-09-07 Thread Thiago Macieira
On domingo, 8 de setembro de 2013 07:04:04, Igor Mironchik wrote: > CONFIG(debug) { > DEFINES += PROJECT_DEBUG > QT += testlib > } > > But why? In release mode? Because the test is wrong. You need to write: CONFIG(debug, debug|release) -- Thiago Macieira - thiago.macieira (AT) intel

Re: [Interest] Windows application runs with console window

2013-09-07 Thread Igor Mironchik
Hi > What a coincidence... Exactly today I found this on SO: > > http://stackoverflow.com/questions/18666799/how-to-prevent-qmake-from-adding-the-console-subsystem-on-the-linker-command-lin#comment27503243_18666799 I also came to this conclusion... But my question is also about the fact that qmak

Re: [Interest] Byte Swapping float and double

2013-09-07 Thread Thiago Macieira
On sábado, 7 de setembro de 2013 15:41:37, Michael Jackson wrote: > I'll plat the naive one here. What is the proper Qt API to byte swap a float > or double? create a union? or some other such trick like that? memcpy to a char buffer, byte swap. DO NOT reload the swapped float or double into a va

Re: [Interest] Byte Swapping float and double

2013-09-07 Thread Constantin Makshin
In this case such casting must be done only through pointers, otherwise you'll just round the floating point number to some (direction dependens on the system and its configuration) integer. On Sep 8, 2013 12:22 AM, "Ilya Diallo" wrote: > Casting to qint32/qin64 (twice for 128 bits floats) and th

Re: [Interest] Byte Swapping float and double

2013-09-07 Thread Ilya Diallo
Casting to qint32/qin64 (twice for 128 bits floats) and then using qToBigEndian ? 2013/9/7 Michael Jackson > I'll plat the naive one here. What is the proper Qt API to byte swap a > float or double? create a union? or some other such trick like that? > > Thanks > Mike Jackson > > On Sep 7, 2013,

Re: [Interest] Byte Swapping float and double

2013-09-07 Thread Michael Jackson
I'll plat the naive one here. What is the proper Qt API to byte swap a float or double? create a union? or some other such trick like that? Thanks Mike Jackson On Sep 7, 2013, at 2:29 PM, Etienne Sandré-Chardonnal wrote: > To be a little be more verbose, here is what the doc says for these fu

[Interest] Move window without borders on Win32

2013-09-07 Thread Philipp Kursawe
Hello, the common trick to move a captionless window on Windows is to call its DefWndProc like this: if (msg->message == WM_LBUTTONDOWN) { *result = DefWindowProc(msg->hwnd, WM_NCLBUTTONDOWN, HTCAPTION, msg->lParam); return false; } I do that in my QMainWindow nativeEvent handler. However now

Re: [Interest] Windows application runs with console window

2013-09-07 Thread Guido Seifert
What a coincidence... Exactly today I found this on SO: http://stackoverflow.com/questions/18666799/how-to-prevent-qmake-from-adding-the-console-subsystem-on-the-linker-command-lin#comment27503243_18666799 On Sat, 07 Sep 2013 10:17:03 +0300 Igor Mironchik wrote: > > > I write an application. >

Re: [Interest] Byte Swapping float and double

2013-09-07 Thread Etienne Sandré-Chardonnal
To be a little be more verbose, here is what the doc says for these functions: *Note:* Template type T can either be a qint16, qint32 or qint64. Other types of integers, e.g., qlong, are not applicable. 2013/9/7 Thiago Macieira > On sábado, 7 de setembro de 2013 12:24:26, Michael Jackson wrote

Re: [Interest] Byte Swapping float and double

2013-09-07 Thread Thiago Macieira
On sábado, 7 de setembro de 2013 12:24:26, Michael Jackson wrote: > I have some code that needs to convert from the system to Big Endian byte > order. All my integers work just fine but I am getting linker errors when > trying to byte swap floats and doubles. > > I have #include > > and I have a

[Interest] Byte Swapping float and double

2013-09-07 Thread Michael Jackson
I have some code that needs to convert from the system to Big Endian byte order. All my integers work just fine but I am getting linker errors when trying to byte swap floats and doubles. I have #include and I have a templates function like this: template void foo(T value) { value = qToBigE

Re: [Interest] Fwd: Is there a way to mock the QNAM?

2013-09-07 Thread Richard Moore
On 7 September 2013 10:58, Alejandro Exojo wrote: > El Martes, 3 de septiembre de 2013, André Somers escribió: >> It's an example of good API design, if you ask me: the public API to use >> is not the same as the (protected) API to extend the class. These are >> different tasks, and they should ha

Re: [Interest] Fwd: Is there a way to mock the QNAM?

2013-09-07 Thread Alejandro Exojo
El Martes, 3 de septiembre de 2013, André Somers escribió: > It's an example of good API design, if you ask me: the public API to use > is not the same as the (protected) API to extend the class. These are > different tasks, and they should have a different API. I'm not the original poster, but,

Re: [Interest] Qt Application deployment across platforms

2013-09-07 Thread Alejandro Exojo
El Jueves, 5 de septiembre de 2013, Rutledge Shawn escribió: > But we should be trying to get there, IMO. The new qml tool (just qml, as > opposed to qmlscene/qmlviewer) is intended for > that. https://codereview.qt-project.org/#change,43540 It can be used as > a shebang handler on Linux/Unix pl

[Interest] Macro definition

2013-09-07 Thread Igor Mironchik
Hi. How to define in project file specific macro for debug mode only? ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest

Re: [Interest] Windows application runs with console window

2013-09-07 Thread Igor Mironchik
I write an application. The common definitions in the project file are: TEMPLATE= app TARGET= application DESTDIR= .. QT += core gui network sql widgets CONFIG+= windows But when I run application I see the console (command prompt) window within my application. Why? I use Qt 5.1.0,MSVC2012