I have the following code in a Qt project, and I want to set the titlebarAppearsTransparent variable for a window to true in Objective-C. The program compiles correctly, but it crashes when it reaches [&w titlebarAppearsTransparent:YES];
Is what I'm trying to do even possible, and if so how do I fix it?
#include "mainwindow.h"
#include <QApplication>
#include <QFile>
#include <QDebug>
#include <QDir>
#include "globals.h"
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#import <AppKit/NSWindow.h>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QApplication::setOrganizationName("Siddha Tiwari");
QApplication::setApplicationName("NarwhalEdit");
MainWindow *w = new MainWindow();
[&w titlebarAppearsTransparent:YES];
setTheme(true);
w->show();
return a.exec();
}