#include "mainwindowdialog.h"
#include "ui_mainwindowdialog.h"
MainWindowDialog
::MainWindowDialog(QWidget *parent
) : QMainWindow(parent
), ui
(new Ui
::MainWindowDialog){
ui->setupUi(this);
ui->comboBox->clear();
<<
QApplication::translate("MainWindowDialog",
"New Item 1", Q_NULLPTR
) <<
QApplication::translate("MainWindowDialog",
"New Item 2", Q_NULLPTR
) <<
QApplication::translate("MainWindowDialog",
"New Item 3", Q_NULLPTR
) <<
QApplication::translate("MainWindowDialog",
"New Item 4", Q_NULLPTR
) <<
QApplication::translate("MainWindowDialog",
"New Item 5", Q_NULLPTR
) <<
QApplication::translate("MainWindowDialog",
"New Item 6", Q_NULLPTR
) <<
QApplication::translate("MainWindowDialog",
"New Item 7", Q_NULLPTR
) <<
QApplication::translate("MainWindowDialog",
"New Item 8", Q_NULLPTR
) <<
QApplication::translate("MainWindowDialog",
"New Item 9", Q_NULLPTR
) <<
QApplication::translate("MainWindowDialog",
"New Item 10", Q_NULLPTR
) <<
QApplication::translate("MainWindowDialog",
"New Item 11", Q_NULLPTR
) <<
QApplication::translate("MainWindowDialog",
"New Item 12", Q_NULLPTR
) <<
QApplication::translate("MainWindowDialog",
"New Item 13", Q_NULLPTR
) <<
QApplication::translate("MainWindowDialog",
"New Item 14", Q_NULLPTR
));
this->setWindowFlags(this->windowFlags() | Qt::WindowStaysOnTopHint);
}
MainWindowDialog::~MainWindowDialog()
{
delete ui;
}
#include "mainwindowdialog.h"
#include "ui_mainwindowdialog.h"
MainWindowDialog::MainWindowDialog(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindowDialog)
{
ui->setupUi(this);
ui->comboBox->clear();
ui->comboBox->insertItems(0, QStringList()
<< QApplication::translate("MainWindowDialog", "New Item 1", Q_NULLPTR)
<< QApplication::translate("MainWindowDialog", "New Item 2", Q_NULLPTR)
<< QApplication::translate("MainWindowDialog", "New Item 3", Q_NULLPTR)
<< QApplication::translate("MainWindowDialog", "New Item 4", Q_NULLPTR)
<< QApplication::translate("MainWindowDialog", "New Item 5", Q_NULLPTR)
<< QApplication::translate("MainWindowDialog", "New Item 6", Q_NULLPTR)
<< QApplication::translate("MainWindowDialog", "New Item 7", Q_NULLPTR)
<< QApplication::translate("MainWindowDialog", "New Item 8", Q_NULLPTR)
<< QApplication::translate("MainWindowDialog", "New Item 9", Q_NULLPTR)
<< QApplication::translate("MainWindowDialog", "New Item 10", Q_NULLPTR)
<< QApplication::translate("MainWindowDialog", "New Item 11", Q_NULLPTR)
<< QApplication::translate("MainWindowDialog", "New Item 12", Q_NULLPTR)
<< QApplication::translate("MainWindowDialog", "New Item 13", Q_NULLPTR)
<< QApplication::translate("MainWindowDialog", "New Item 14", Q_NULLPTR));
this->setWindowFlags(this->windowFlags() | Qt::WindowStaysOnTopHint);
}
MainWindowDialog::~MainWindowDialog()
{
delete ui;
}
To copy to clipboard, switch view to plain text mode
Header:
#ifndef MAINWINDOWDIALOG_H
#define MAINWINDOWDIALOG_H
#include <QMainWindow>
#include "QComboBox.h"
namespace Ui {
class MainWindowDialog;
}
{
Q_OBJECT
public:
explicit MainWindowDialog
(QWidget *parent
= 0);
~MainWindowDialog();
private:
Ui::MainWindowDialog *ui;
};
#endif // MAINWINDOWDIALOG_H
#ifndef MAINWINDOWDIALOG_H
#define MAINWINDOWDIALOG_H
#include <QMainWindow>
#include "QComboBox.h"
namespace Ui {
class MainWindowDialog;
}
class MainWindowDialog : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindowDialog(QWidget *parent = 0);
~MainWindowDialog();
private:
Ui::MainWindowDialog *ui;
};
#endif // MAINWINDOWDIALOG_H
To copy to clipboard, switch view to plain text mode
Bookmarks