Re: [Interest] Qt/iOS subclassing and/or delegating

2015-05-29 Thread Ben Lau
You are welcome. By the way, you may submit a feature request, I will vote for it. On 30 May 2015 at 00:11, maitai wrote: > I have already spend 3 days on that when the same thing on Android took > me 5 minutes, so I think I'm not going to swizzle anything soon ;) I might > give it a try one d

Re: [Interest] Bug when building Qt statically? Undefined symbols for architecture i386: "QTcpServerConnection::QTcpServerConnection()"

2015-05-29 Thread Thiago Macieira
On Friday 29 May 2015 22:46:22 Nuno Santos wrote: > Hi, > > I have been faced with this problem on Windows and now I have the same > problem on Mac OSX. This happens when I build Qt statically > > Undefined symbols for architecture i386: > "QTcpServerConnection::QTcpServerConnection()", referen

[Interest] Bug when building Qt statically? Undefined symbols for architecture i386: "QTcpServerConnection::QTcpServerConnection()"

2015-05-29 Thread Nuno Santos
Hi, I have been faced with this problem on Windows and now I have the same problem on Mac OSX. This happens when I build Qt statically Undefined symbols for architecture i386: "QTcpServerConnection::QTcpServerConnection()", referenced from: QQmlDebugServerThread::run() in libQt5Qml.a(qqm

[Interest] Qt4 user-selected default font not respected on OS X

2015-05-29 Thread René J . V . Bertin
Hi, I've found a good (though not the smallest) example of a Qt application that does not respect the default font set through QtConfig, in Qt 4.8.7 : doxygen's GUI interface/wizard. When the application is first launched, and as long as it doesn't get an expose/redraw event, QLabels and QButt

Re: [Interest] Build Qt from source in 32bit (-platform macx-clang-32)

2015-05-29 Thread Nuno Santos
Sorry if you have already told me that. It might have escaped me. Yesterday there was too much information to absorve! :) I’m currently struggling with the Qt plugins path. It seems that Qt uses qt.conf to tell where the plugins are. If the qt.conf is not found it uses hard coded path. The prob

Re: [Interest] Build Qt from source in 32bit (-platform macx-clang-32)

2015-05-29 Thread René J . V . Bertin
On Friday May 29 2015 17:51:58 Nuno Santos wrote: Hi Nuno, > The solution is to change the loading path of dependent QtFrameworks to > something like this: > > install_name_tool -change > /Users/nsantos/Qt/5.4/clang_32/lib/QtCore.framework/Versions/5/QtCore > @loader_path/../../../QtCore.Fra

Re: [Interest] Build Qt from source in 32bit (-platform macx-clang-32)

2015-05-29 Thread Nuno Santos
Rene, I don’t know how did I trick myself thinking I had success. Later I tried to hack macdeployqt to write loader_path instead of executable_path but it didn’t worked. I have tried again manually and it didn’t worked. Today I have found this on dyld documentation: @loader_path/ This variabl

Re: [Interest] Qt/iOS subclassing and/or delegating

2015-05-29 Thread maitai
I have already spend 3 days on that when the same thing on Android took me 5 minutes, so I think I'm not going to swizzle anything soon ;) I might give it a try one day though. I believe that should be anyway a part of qt API. Thanks all for your advice and comments Philippe. Le 29-05-2015

Re: [Interest] Poor QMethod::invoke performance across threads on i.MX53

2015-05-29 Thread Matthew Woehlke
On 2015-05-28 14:02, Thiago Macieira wrote: > On Thursday 28 May 2015 11:31:10 Matthew Woehlke wrote: >>> Again missing the move-back. >> >> Why is a move-back needed? What goes sideways without it? > > Because you want to destroy the object. You can only destroy a QObject in its > thread of affi

Re: [Interest] Qt/iOS subclassing and/or delegating

2015-05-29 Thread Ben Lau
Depend on what kind of function you should to override. Just checked the source code of QIOSViewController , shouldAutorotate is seem to be OK. Moreover, Harri Pasanen has suggested swizzling, which could replace a method and call the original one by the wrapper. On 29 May 2015 at 21:43, maitai

[Interest] Server-Sent Events in QML

2015-05-29 Thread Kyle Fazzari
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hey all. I have a quick question: I'm investigating doing some asynchronous communication between a client and server, and we're weighing two options: websockets and server-sent events (SSEs). I'm happy to see that QML supports websockets out of th

Re: [Interest] Qt/iOS subclassing and/or delegating

2015-05-29 Thread maitai
I think you can do that because openUrl is the only method implemented in the original QIOApplicationDelegate. So in fact you added didFinishLaunchingWithOptions and replaced openUrl. But if there were other methods (and QIOViewController has many), you would have been obliged to duplicate them

Re: [Interest] Qt/iOS subclassing and/or delegating

2015-05-29 Thread Ben Lau
You may override existing method just like what I did to openUrl and didFinishLaunchingWithOptions on QIOSApplicationDelegate even you don't have the header file. On 29 May 2015 at 21:25, maitai wrote: > I tried but didn't succeed. If I understand well (which is far from > being certain), I

Re: [Interest] Qt/iOS subclassing and/or delegating

2015-05-29 Thread maitai
I tried but didn't succeed. If I understand well (which is far from being certain), I can only add new methods or properties that way, not override existing ones unless a protocol is defined that would allow me to create a delegate on QIOViewController, but there is no as far as I can see. I m

Re: [Interest] Qt/iOS subclassing and/or delegating

2015-05-29 Thread Ben Lau
Why don't use categories that suggested by people here? On 29 May 2015 at 21:11, maitai wrote: > Finally got it working... with a bad hack > > I cloned QIOSViewController.h and .mm from qt sources (and added qt's > iOS headers in my include path, I already had core-private and > gui-private in

Re: [Interest] Qt/iOS subclassing and/or delegating

2015-05-29 Thread maitai
Finally got it working... with a bad hack I cloned QIOSViewController.h and .mm from qt sources (and added qt's iOS headers in my include path, I already had core-private and gui-private in my pro files) and modified it to do what I want. I also had to add a lockedOrientation property to it for

Re: [Interest] SQLite

2015-05-29 Thread Burak Arslan
Hello, On 05/28/15 21:31, Jason H wrote: > I once wrote a ORM that took an XML definition, and spat out QObject-derived > classes that provided QObject QPROPERTY to SQLite database mappings. So it > would create the SQL schema, the source files (.cpp/h) had support for > transactions and rollba

Re: [Interest] Qt/iOS subclassing and/or delegating

2015-05-29 Thread maitai
I had a look at QT sources... Basically what I want to do is override QIOSViewController:shouldAutorotate. I tried @interface MyIOSViewController : QIOSViewController @end @implementation MyIOSViewController - (BOOL) shouldAutorotate { NSLog(@"Inside shouldAutorotate"); return NO; } It

Re: [Interest] Qt/iOS subclassing and/or delegating

2015-05-29 Thread Harri Pasanen
Compared to C++, Objective-C is very dynamic language and you can do many things at runtime. So you can add methods to existing classes using categories: https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExisting

Re: [Interest] Qt/iOS subclassing and/or delegating

2015-05-29 Thread Robert Iakobashvili
On Fri, May 29, 2015 at 8:38 AM, maitai wrote: > Thanks Ben for your reply > > After much digging I made some progress but I am still looking for a way to > temporary lock screen auto rotation. > > I have created my own app delegate to catch openUrl(), and surprisingly it > works. I register my ap