Qt Mac error
-
[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();
}
@ -
@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.
-
Yep! Same question: Qt under cocoa? And QML under IOS ??? Is there a reliable way without spend days to setup a decent dev env?
-
[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
-
@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.
-
True, I am not Moderator of this forum, only Italian / Spanish and Mobile and embedded. If you can, please move it. Thanks.
-
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...
-
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?