#include <QtGui>
#include <QtWidgets>
#include <QMainWindow>
#import <Cocoa/Cocoa.h>

int main(int argc, char* argv[])
{
	QApplication app(argc, argv);
	
	QMainWindow* window = new QMainWindow;
	window->setWindowTitle(QLatin1String("Main Window"));
	window->resize(200,200);
	window->move(100,100);
	window->show();

    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
	NSSearchField     *search = [[NSSearchField     alloc] init];
	[[search cell] setPlaceholderString:@"Cocoa Native"];

	QWindow *searchWindow = QWindow::fromWinId(WId(search));
	QWidget *searchWidget = QWidget::createWindowContainer(searchWindow);
	window->setCentralWidget(searchWidget);

    [search release];
    [pool   release];
	
	return app.exec();
}
