diff -r 2b40d63a9c3d -r 90517678cc4f qtmobility/examples/publish-subscribe/subscriberdialog.cpp --- a/qtmobility/examples/publish-subscribe/subscriberdialog.cpp Fri Apr 16 15:51:22 2010 +0300 +++ b/qtmobility/examples/publish-subscribe/subscriberdialog.cpp Mon May 03 13:18:40 2010 +0300 @@ -40,7 +40,11 @@ ****************************************************************************/ #include "subscriberdialog.h" +#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) +#include "ui_subscriberdialog_hor.h" +#else #include "ui_subscriberdialog.h" +#endif #include @@ -48,7 +52,7 @@ #include #include -#ifdef QTM_SMALL_SCREEN +#ifdef QTM_EXAMPLES_SMALL_SCREEN #include #include #endif @@ -63,12 +67,23 @@ { ui->setupUi(this); -#ifdef QTM_SMALL_SCREEN +#ifdef QTM_EXAMPLES_SMALL_SCREEN QPushButton *switchButton = ui->buttonBox->addButton(tr("Switch"), QDialogButtonBox::ActionRole); connect(switchButton, SIGNAL(clicked()), this, SIGNAL(switchRequested())); #endif +#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) + tableWidget = ui->tableWidget; + QStringList headerLabels; + headerLabels << tr("Key") << tr("Value") << tr("Type"); + tableWidget->setColumnCount(3); + tableWidget->setHorizontalHeaderLabels(headerLabels); + tableWidget->horizontalHeader()->setStretchLastSection(true); + tableWidget->verticalHeader()->setVisible(false); + tableWidget->setColumnWidth(0, 200); + tableWidget->setColumnWidth(1, 400); +#else QDesktopWidget desktopWidget; if (desktopWidget.availableGeometry().width() < 400) { // Screen is too small to fit a table widget without scrolling, use a list widget instead. @@ -86,7 +101,7 @@ ui->verticalLayout->insertWidget(2, tableWidget); } - +#endif connect(ui->connectButton, SIGNAL(clicked()), this, SLOT(changeSubscriberPath())); changeSubscriberPath(); }