Qt Mac error
-
wrote on 24 Aug 2011, 08:01 last edited by
hii,
I am making a Qt application for MAC OSX 10.6.2(Snow Leopard). My problem is, as soon as I run the application,I gets the following warnings..can anyone help me for this..Thanks in advance..
-
“2011-08-24 12:00:39.295 MyApp[379:80f] *** __NSAutoreleaseNoPool(): Object 0×6a89090 of class NSCFArray autoreleased with no pool in place – just leaking”
-
“QCocoaView handleTabletEvent: This tablet device is unknown (received no proximity event for it). Discarding event.”
-
-
wrote on 14 Sept 2011, 10:57 last edited by
The first one is a "known bug":https://bugreports.qt.nokia.com//browse/QTBUG-7385 but should have been fixed in a new version of Qt.
The second one seems to indicate that you have a tablet device connected by can't be recognized. What machine do you run your OS in? What Qt version do you use?
-
wrote on 14 Sept 2011, 16:50 last edited by
I never know that you can develop Apple Application using Qt with Cocoa Framework. How to do that?
-
wrote on 15 Sept 2011, 00:22 last edited by
You can't. The two error messages above came from usual Qt applications.
-
wrote on 15 Sept 2011, 10:45 last edited by
I am using Mac OS X 10.6.2 on virtual box and I am using Qt 4.7.4.
-
wrote on 21 Sept 2011, 03:46 last edited by
Using VMWare? Then this is also a known problem. See "this link.":https://bugreports.qt.nokia.com/browse/QTBUG-4447
-
wrote on 21 Sept 2011, 07:13 last edited by
In the link you had given, there they had mention about a file named qapplication_mac.mm, in that I have to do some changes.But i could not find that file in my MAC, where is it located? do you know anything about it?
and also do you know anything about the following error,
@1. “2011-08-24 12:00:39.295 MyApp[379:80f] *** __NSAutoreleaseNoPool(): Object 0×6a89090 of class NSCFArray autoreleased with no pool in place – just leaking”@ -
wrote on 21 Sept 2011, 07:33 last edited by
qapplication_mac.mm should be in the source of Qt. By changing the lines, you need to download the source code of Qt, modify the file mentioned above, and compile/install the Qt libraries by yourself. Not exactly an easy thing to do if you don't have some experience.
I don't have a VM running Mac OS X, so there's little else I can provide on this one, but the workaround mentioned by Alessandro Wilner in the bug report might be worth a try.
Also I would recommend you try to reveal this problem to VMWare, and let them fix this problem.
The "leaking" problem should have been fixed after 4.6.2, so if it's coming back again, you can just "submit another bug report on this issue":https://bugreports.qt.nokia.com.
-
wrote on 21 Sept 2011, 08:47 last edited by
[quote author="paladin_knight" date="1316019039"]I never know that you can develop Apple Application using Qt with Cocoa Framework. How to do that?[/quote]
@
#qt_cocoa.pro****
QT += core guiTARGET = qt_cocoa
TEMPLATE = appSOURCES += main.cpp
dialog.mmHEADERS += dialog.h
LIBS += -framework Cocoa
@@
//dialog.h****
#ifndef DIALOG_H
#define DIALOG_H#include <QtGui/QDialog>
class Dialog : public QDialog
{
Q_OBJECTpublic:
Dialog(QWidget *parent = 0);
~Dialog();
};#endif // DIALOG_H
@@
//dialog.mm*****
#include "dialog.h"#import <Cocoa/Cocoa.h>
Dialog::Dialog(QWidget *parent)
: QDialog(parent)
{
NSLog(@"aaaaa");
NSRunAlertPanel(@"Fido", @"Rover is %d", @"Rex", @"Spot", nil, 8);
}Dialog::~Dialog()
{}
@@
//main.cpp**
#include <QtGui/QApplication>
#include "dialog.h"int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Dialog w;
w.show();return a.exec();
}
@ -
wrote on 21 Sept 2011, 08:56 last edited by
@szuzsq You win! LOL
I actually tried to use Qt Widgets in an NSApplication after reading @paladin_knight's post. But I couldn't get it work after like 30 minutes, and I gave up. =p Didn't thought about doing it the other way around like you did.
-
wrote on 21 Sept 2011, 09:06 last edited by
Yep! Same question: Qt under cocoa? And QML under IOS ??? Is there a reliable way without spend days to setup a decent dev env?
-
wrote on 21 Sept 2011, 18:35 last edited by
[quote author="Alicemirror" date="1316595981"]And QML under IOS ???[/quote]
QML is Qt, so this has been discussed "here":http://developer.qt.nokia.com/forums/viewthread/7271 and "here":http://developer.qt.nokia.com/forums/viewthread/4401
-
wrote on 21 Sept 2011, 18:52 last edited by
@Volker: in theory it is true, but as I have read (and not experimented yet) I know that the Qt porting for Android is Qt but doesn't include the QML declarative while under IOS I had notice of some portings of QML UI and not Qt at all.
-
wrote on 21 Sept 2011, 19:19 last edited by
That discussion should be left to a new thread then, as I can see no relation to the NSAutoreleaseNoPool problem?!?
-
wrote on 21 Sept 2011, 19:42 last edited by
True, I am not Moderator of this forum, only Italian / Spanish and Mobile and embedded. If you can, please move it. Thanks.
-
wrote on 21 Sept 2011, 20:38 last edited by
I'm reluctant to split off an answer that is at least partially related to the original topic, so better just start a new thread.
-
wrote on 21 Sept 2011, 20:51 last edited by
If is possible to duplicate some posts, else if you want to split I think that the best point is after the answer of @uranusjr...
-
wrote on 3 Feb 2013, 15:45 last edited by
I'm hoping someone can verify that this "suggested code change":https://bugreports.qt-project.org/browse/QTBUG-4447 does in fact fix the "tablet device is unknown" error; I'd prefer to be sure before I go to the hassle of recompiling the libraries. Alternatively is there some way to implement Alessandro Wilner's (same page, under "comments") USB mouse workaround in VirtualBox, as opposed to VMware?
-
This post is deleted!