Created
June 28, 2011 16:53
-
-
Save vmlemon/1051578 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "mainwindow.h" | |
| #include "ui_mainwindow.h" | |
| #import <Cocoa/Cocoa.h> | |
| #include <QString> | |
| NSString *iLogText = @"Testing NSLog from Qt!"; | |
| QString iDemoQString = "This is a QString"; | |
| NSString *iDemoNSString; | |
| MainWindow::MainWindow(QWidget *parent) : | |
| QMainWindow(parent), | |
| ui(new Ui::MainWindow) | |
| { | |
| ui->setupUi(this); | |
| } | |
| MainWindow::~MainWindow() | |
| { | |
| delete ui; | |
| } | |
| void MainWindow::on_pushButton_clicked() | |
| { | |
| iDemoNSString = [NSString stringWithUTF8String:iDemoQString.toUtf8().data()]; | |
| NSBeep(); | |
| NSLog(iLogText); | |
| NSLog(iDemoNSString); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment