#include //#include "Cocoa/Cocoa.h" class ToolWindow : public QWidget { public: ToolWindow(QWidget *parent = 0) : QWidget(parent) { this->setWindowFlags(Qt::Tool | Qt::WindowStaysOnTopHint); one = new QToolButton(this); one->setToolTip("one"); two = new QToolButton(this); two->setToolTip("two"); three = new QToolButton(this); three->setToolTip("three"); QHBoxLayout *toolLay = new QHBoxLayout(this); toolLay->addWidget(one); toolLay->addWidget(two); toolLay->addWidget(three); } QToolButton *one; QToolButton *two; QToolButton *three; }; class Dialog : public QDialog { Q_OBJECT public: Dialog(QWidget *parent = 0) : QDialog(parent) { full = new QPushButton("Show Full Screen", this); normal = new QPushButton("Show Normal Screen", this); QHBoxLayout *layout = new QHBoxLayout(this); layout->addWidget(full); layout->addWidget(normal); connect(full, SIGNAL(clicked()), this, SLOT(showDialogFullScreen())); connect(normal, SIGNAL(clicked()), this, SLOT(showDialogNormal())); ToolWindow *toolWindow = new ToolWindow(this); toolWindow->show(); } QPushButton *full; QPushButton *normal; public slots: void showDialogFullScreen() { this->showFullScreen(); //[NSMenu setMenuBarVisible:NO]; } void showDialogNormal() { this->showNormal(); } }; #include "main.moc" int main(int argc, char **argv) { QApplication app(argc, argv); Dialog dialog; dialog.show(); return app.exec(); }