diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-02-20 15:55:55 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-02-25 10:22:53 +0100 |
commit | a325de1910e6627e4d042114d22303cc68fae7a9 (patch) | |
tree | cabf88f9e4e42579e6695ecff5e6ab787f3922ab /examples/serialport/enumerator | |
parent | d42d5838b9a4c3cbd6b0e67dabce658ba737eba8 (diff) | |
parent | b84fe7eb3d6d977a347bfbb82da724409b2eda69 (diff) |
Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
.qmake.conf
src/serialport/qserialport_unix.cpp
src/serialport/qserialport_unix_p.h
src/serialport/qserialport_win.cpp
src/serialport/qserialport_win_p.h
src/serialport/qserialport_wince.cpp
src/serialport/qserialport_wince_p.h
Change-Id: Ibb917652b132e66fbb90f437bf762c1094911dc0
Diffstat (limited to 'examples/serialport/enumerator')
-rw-r--r-- | examples/serialport/enumerator/main.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/examples/serialport/enumerator/main.cpp b/examples/serialport/enumerator/main.cpp index e7564ec3..41bfddd4 100644 --- a/examples/serialport/enumerator/main.cpp +++ b/examples/serialport/enumerator/main.cpp @@ -36,6 +36,7 @@ #include <QWidget> #include <QVBoxLayout> #include <QLabel> +#include <QScrollArea> #include <QtSerialPort/QSerialPortInfo> QT_USE_NAMESPACE @@ -44,8 +45,6 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); - QWidget w; - w.setWindowTitle(QObject::tr("Info about all available serial ports.")); QVBoxLayout *layout = new QVBoxLayout; foreach (const QSerialPortInfo &info, QSerialPortInfo::availablePorts()) { @@ -62,8 +61,13 @@ int main(int argc, char *argv[]) layout->addWidget(label); } - w.setLayout(layout); - w.show(); + QWidget *workPage = new QWidget; + workPage->setLayout(layout); + + QScrollArea area; + area.setWindowTitle(QObject::tr("Info about all available serial ports.")); + area.setWidget(workPage); + area.show(); return a.exec(); } |