当前位置: 首页>>代码示例>>C++>>正文


C++ QTableWidgetItem::flags方法代码示例

本文整理汇总了C++中QTableWidgetItem::flags方法的典型用法代码示例。如果您正苦于以下问题:C++ QTableWidgetItem::flags方法的具体用法?C++ QTableWidgetItem::flags怎么用?C++ QTableWidgetItem::flags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QTableWidgetItem的用法示例。


在下文中一共展示了QTableWidgetItem::flags方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: showFiles

//! [8]
void Window::showFiles(const QStringList &paths) {
  for (const QString &filePath : paths) {
    const QString toolTip = QDir::toNativeSeparators(filePath);
    const QString relativePath =
        QDir::toNativeSeparators(currentDir.relativeFilePath(filePath));
    const qint64 size = QFileInfo(filePath).size();
    QTableWidgetItem *fileNameItem = new QTableWidgetItem(relativePath);
    fileNameItem->setData(absoluteFileNameRole, QVariant(filePath));
    fileNameItem->setToolTip(toolTip);
    fileNameItem->setFlags(fileNameItem->flags() ^ Qt::ItemIsEditable);
    QTableWidgetItem *sizeItem =
        new QTableWidgetItem(QLocale().formattedDataSize(size));
    sizeItem->setData(absoluteFileNameRole, QVariant(filePath));
    sizeItem->setToolTip(toolTip);
    sizeItem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
    sizeItem->setFlags(sizeItem->flags() ^ Qt::ItemIsEditable);

    int row = filesTable->rowCount();
    filesTable->insertRow(row);
    filesTable->setItem(row, 0, fileNameItem);
    filesTable->setItem(row, 1, sizeItem);
  }
  filesFoundLabel->setText(tr(
      "%n file(s) found (Double click on a file to open it)", 0, paths.size()));
  filesFoundLabel->setWordWrap(true);
}
开发者ID:Jinxiaohai,项目名称:QT,代码行数:27,代码来源:window.cpp

示例2: subscriberChanged

//! [1]
void SubscriberDialog::subscriberChanged()
{
    QStringList subPaths = subscriber->subPaths();

    if (listWidget) {
        listWidget->clear();
    } else if (tableWidget) {
        tableWidget->clearContents();
        tableWidget->setRowCount(subPaths.count());
    }

    for (int i = 0; i < subPaths.count(); ++i) {
        QVariant v = subscriber->value(subPaths.at(i));

        if (listWidget) {
            const QString itemTemplate("%1 (%2)\n%3");

            QListWidgetItem *item =
                new QListWidgetItem(itemTemplate.arg(subPaths.at(i), v.typeName(), v.toString()));
            item->setFlags(item->flags() & ~Qt::ItemIsEditable);
            listWidget->addItem(item);
        } else if (tableWidget) {
            QTableWidgetItem *pathItem = new QTableWidgetItem(subPaths.at(i));
            pathItem->setFlags(pathItem->flags() & ~Qt::ItemIsEditable);
            QTableWidgetItem *valueItem = new QTableWidgetItem(v.toString());
            valueItem->setFlags(valueItem->flags() & ~Qt::ItemIsEditable);
            QTableWidgetItem *typeItem = new QTableWidgetItem(v.typeName());
            typeItem->setFlags(typeItem->flags() & ~Qt::ItemIsEditable);

            tableWidget->setItem(i, 0, pathItem);
            tableWidget->setItem(i, 1, valueItem);
            tableWidget->setItem(i, 2, typeItem);
        }
    }
}
开发者ID:kaltsi,项目名称:qt-mobility,代码行数:36,代码来源:subscriberdialog.cpp

示例3: createFilesTable

static QTableWidget* createFilesTable(const QStringList &fileNames)
{
    QTableWidget *table = new QTableWidget(0, 2);
    table->setSelectionMode(QAbstractItemView::NoSelection);

    QStringList labels({
                           QCoreApplication::translate("AddImageToResources","Filename"),
                           QCoreApplication::translate("AddImageToResources","Size")
                       });
    table->setHorizontalHeaderLabels(labels);
    table->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch);
    table->verticalHeader()->hide();
    table->setShowGrid(false);

    for (const QString &filePath : fileNames) {
           const QString toolTip = QDir::toNativeSeparators(filePath);
           const QString fileName = QFileInfo(filePath).fileName();
           const qint64 size = QFileInfo(filePath).size() / 1024;
           QTableWidgetItem *fileNameItem = new QTableWidgetItem(fileName);
           fileNameItem->setToolTip(toolTip);
           fileNameItem->setFlags(fileNameItem->flags() ^ Qt::ItemIsEditable);
           QTableWidgetItem *sizeItem = new QTableWidgetItem(QString::number(size) + " KB");
           sizeItem->setToolTip(toolTip);
           sizeItem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
           sizeItem->setFlags(sizeItem->flags() ^ Qt::ItemIsEditable);

           int row = table->rowCount();
           table->insertRow(row);
           table->setItem(row, 0, fileNameItem);
           table->setItem(row, 1, sizeItem);
       }

    return table;
}
开发者ID:choenig,项目名称:qt-creator,代码行数:34,代码来源:addimagesdialog.cpp

示例4: setData

void AnswersWidget::setData(const QString & data, int idValue)
{
    id = idValue;
    ui->answersTableWidget->setRowCount(0);
    QStringList rowSplitResults = data.split(';');
    int rowIndex = 0;

    for (QString rowSplitResult : rowSplitResults)
    {
        QStringList columnSplitResult = rowSplitResult.split(':');
        if (columnSplitResult.count() == 2)
        {
            QTableWidgetItem * answerTableWidgetItem  = new QTableWidgetItem(columnSplitResult[0]);
            answerTableWidgetItem->setFlags(answerTableWidgetItem->flags() | Qt::ItemIsEditable);

            QTableWidgetItem * correctTableWidgetItem = new QTableWidgetItem(columnSplitResult[1]);
            correctTableWidgetItem->setFlags(answerTableWidgetItem->flags() | Qt::ItemIsEditable);

            ui->answersTableWidget->insertRow(rowIndex);
            ui->answersTableWidget->setItem(rowIndex, 0, answerTableWidgetItem);
            ui->answersTableWidget->setItem(rowIndex, 1, correctTableWidgetItem);

            rowIndex++;
        }
    }
}
开发者ID:denisislamov,项目名称:SqlTestsApp,代码行数:26,代码来源:answerswidget.cpp

示例5: updateCategoryTable

void LandmarkBrowser::updateCategoryTable(const QList<QLandmarkCategory> &cats)
{
    QLandmarkCategory cat;
    QTableWidgetItem *item;
    for ( int i =0; i < cats.count(); ++i) {
        cat = cats.at(i);
        categoryTable->insertRow(categoryTable->rowCount());
        if(manager->isReadOnly(cat.categoryId())) {
            item = new QTableWidgetItem(cat.name() + "(global)");
            item->setFlags(item->flags() & ~Qt::ItemIsEditable);
            categoryTable->setItem(categoryTable->rowCount()-1,0, item);
        } else {
            item = new QTableWidgetItem(cat.name());
            item->setFlags(item->flags() & ~Qt::ItemIsEditable);
            categoryTable->setItem(categoryTable->rowCount()-1,0,item);
        }

        item = new QTableWidgetItem(cat.categoryId().localId());
        item->setFlags(item->flags() & ~Qt::ItemIsEditable);
        categoryTable->setItem(categoryTable->rowCount()-1,1, item);

        if (i %20)
            qApp->processEvents();
    }
}
开发者ID:KDE,项目名称:android-qt-mobility,代码行数:25,代码来源:landmarkbrowser.cpp

示例6: addPreset

void PresetController::addPreset(Preset *p){

    p->setParent(this);

    m_instanceNum++;

    m_pList.append(p);

    if(p->m_name == QString()){
        p->m_name = tr("Preset ") + QString::number(m_instanceNum);
    }

    QTableWidgetItem *name = new QTableWidgetItem(p->m_name);
    QTableWidgetItem *set  = new QTableWidgetItem(tr("set"));
    QTableWidgetItem *del  = new QTableWidgetItem(tr("del"));
    name->setToolTip(tr("Preset saved on ") + p->m_date.toString(tr("dd-MM-yyyy hh:mm:ss")));
    set->setFlags(set->flags() & ~Qt::ItemIsEditable);
    set->setTextAlignment(Qt::AlignCenter);
    del->setFlags(del->flags() & ~Qt::ItemIsEditable);
    del->setTextAlignment(Qt::AlignCenter);

    int row = m_tw->rowCount();
    m_tw->insertRow(row);
    m_tw->setItem(row, 0, name);
    m_tw->setItem(row, 1, set);
    m_tw->setItem(row, 2, del);

    GLOBAL_settingsChanged = true;
}
开发者ID:nzhome,项目名称:lightcontroller,代码行数:29,代码来源:presetcontroller.cpp

示例7: setRow

void jTransaction::setRow(QTableWidget* table, int row)
{
    QTableWidgetItem * dateTableItem;
    QTableWidgetItem * descTableItem;
    QTableWidgetItem * catTableItem;
    QTableWidgetItem * amountTableItem;

    dateTableItem = new QTableWidgetItem();
    dateTableItem->setFlags(dateTableItem->flags() ^ Qt::ItemIsEditable);
    dateTableItem->setData(Qt::EditRole, mDate);

    descTableItem = new QTableWidgetItem(mDescription);
    descTableItem->setFlags(descTableItem->flags() ^ Qt::ItemIsEditable);

    catTableItem = new QTableWidgetItem(mCategory);
    catTableItem->setFlags(catTableItem->flags() ^ Qt::ItemIsEditable);

    amountTableItem = new QTableWidgetItem(QLocale().toCurrencyString(mAmount));
    amountTableItem->setFlags(amountTableItem->flags() ^ Qt::ItemIsEditable);

    table->setItem(row,0, dateTableItem);
    table->setItem(row,1, catTableItem);
    table->setItem(row,2, descTableItem);
    table->setItem(row,3, amountTableItem);
}
开发者ID:JanusErasmus,项目名称:qt-finance,代码行数:25,代码来源:jtransaction.cpp

示例8: showFiles

void Window::showFiles(const QStringList &files)
{
	for (int i=0; i<files.size(); ++i)
	{
		QFile file(currentDir.absoluteFilePath(files[i]));
		qint64 size = QFileInfo(file).size();
		
		QTableWidgetItem *fileNameItem = new QTableWidgetItem(files[i]);
		fileNameItem->setFlags(fileNameItem->flags() ^ Qt::ItemIsEditable);
		QTableWidgetItem *sizeItem = new QTableWidgetItem(tr("%1 KB")
														.arg(int((size + 1023) / 1024)));
		
		sizeItem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
		sizeItem->setFlags(sizeItem->flags() ^ Qt::ItemIsEditable);
	
		int row = filesTable->rowCount();
		filesTable->insertRow(row);
		filesTable->setItem(row, 0, fileNameItem);
		filesTable->setItem(row, 1, sizeItem);
	}
		
	filesFoundLabel->setText(tr("%1 file(s) found")
							.arg(files.size())
							+ " Double click to open it");
}
开发者ID:panweiping3,项目名称:programming,代码行数:25,代码来源:window.cpp

示例9: addActionToQueue

/*! @brief Takes in an action and adds it to the queue.

    This function parses the passed action and displays the appropriate information in the table.
    It also stores the action as data in the QTableWidgetItem in the first column.
    This is done using the function setData().
    This function takes in an int and a QVariant.
    The int represents a role - this is basically an index into an array or a key into a hashtable.
    The role used here is predefined within Qt - Qt::UserRole.
    This role is specifically set aside by Qt for the user to use - it should be empty unless the user puts something in it.
    The QVariant is the data to be stored. QVariants can store any type of data - even structs!
    In this case, an action struct is being stored using the function setValue().
    After storing the action into the QVariant, the QVariant can be stored in the QTableWidgetItem using setData().

    To extract the data from the QTableWidgetItem, simply call the function data().
    This function takes in an int representing a role. To retrieve the data store here, pass it Qt::UserRole.
    The function will return a QVariant. The QVariant can be cast into whatever data type is stored within it using the value() function.
    In this case, of course, the data type is the struct Action. The form for the function should look like this:

    Action act = qvariant.value<Action>();

    "Action" here can be replaced with an arbitrary data type.
*/
void Queue::addActionToQueue(Action action) {
    QVariant v;
    v.setValue(action);
    QTableWidgetItem* act = new QTableWidgetItem(0);
    act->setData(Qt::UserRole, v);
    act->setFlags(act->flags() ^ Qt::ItemIsEditable);

    QTableWidgetItem* span = new QTableWidgetItem(0);
    span->setFlags(span->flags() ^ Qt::ItemIsEditable);
    span->setTextAlignment(Qt::AlignHCenter);

    int index = action.queueIndex;
    if (action.typ != INITIALIZE || rowCount() == 0) {
        insertRow(index);
        setRowHeight(index, 20);
    }

    setItem(index, 0, act);
    setItem(index, 1, span);
    for (int i=0; i < 5; i++) {
        QTableWidgetItem* item = new QTableWidgetItem(0);
        item->setFlags(item->flags() ^ Qt::ItemIsEditable);
        item->setTextAlignment(Qt::AlignHCenter);
        setItem(index, i + 2, item);
    }
    updateQueue(index, rowCount());
}
开发者ID:dtamayo,项目名称:OGRE,代码行数:49,代码来源:Queue.cpp

示例10: populateTable

void QgsAuthMethodPlugins::populateTable()
{
  QgsAuthMethodsMap authmethods( QgsAuthManager::instance()->authMethodsMap() );

  int i = 0;
  for ( QgsAuthMethodsMap::const_iterator it = authmethods.constBegin(); it != authmethods.constEnd(); ++it, i++ )
  {
    QgsAuthMethod *authmethod( it.value() );
    if ( !authmethod )
    {
      continue;
    }

    QTableWidgetItem *twi = new QTableWidgetItem( authmethod->key() );
    twi->setFlags( twi->flags() & ~Qt::ItemIsEditable );
    tblAuthPlugins->setItem( i, 0, twi );

    twi = new QTableWidgetItem( authmethod->displayDescription() );
    twi->setFlags( twi->flags() & ~Qt::ItemIsEditable );
    tblAuthPlugins->setItem( i, 1, twi );

    twi = new QTableWidgetItem( authmethod->supportedDataProviders().join( ", " ) );
    twi->setFlags( twi->flags() & ~Qt::ItemIsEditable );
    tblAuthPlugins->setItem( i, 2, twi );
  }
  tblAuthPlugins->sortItems( 0 );
}
开发者ID:AM7000000,项目名称:QGIS,代码行数:27,代码来源:qgsautheditorwidgets.cpp

示例11: showFiles

//! [8]
void Window::showFiles(const QStringList &files)
{
    for (int i = 0; i < files.size(); ++i) {
        QFile file(currentDir.absoluteFilePath(files[i]));
        qint64 size = QFileInfo(file).size();

        QTableWidgetItem *fileNameItem = new QTableWidgetItem(files[i]);
        fileNameItem->setFlags(fileNameItem->flags() ^ Qt::ItemIsEditable);
        QTableWidgetItem *sizeItem = new QTableWidgetItem(tr("%1 KB")
                                             .arg(int((size + 1023) / 1024)));
        sizeItem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
        sizeItem->setFlags(sizeItem->flags() ^ Qt::ItemIsEditable);

        int row = filesTable->rowCount();
        filesTable->insertRow(row);
        filesTable->setItem(row, 0, fileNameItem);
        filesTable->setItem(row, 1, sizeItem);
    }
    filesFoundLabel->setText(tr("%1 file(s) found").arg(files.size()) +
#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
                             (" (Select file to open it)"));
#else
                             (" (Double click on a file to open it)"));
#endif
    filesFoundLabel->setWordWrap(true);
}
开发者ID:Kwangsub,项目名称:qt-openwebos,代码行数:27,代码来源:window.cpp

示例12: Recargar

void Pasajeros::Recargar()
{
    for(int i = 0; i < ui->TablaPasajeros->rowCount();){
        delete ui->TablaPasajeros->item(i,0);
        delete ui->TablaPasajeros->item(i,1);
        delete ui->TablaPasajeros->item(i,2);
        ui->TablaPasajeros->removeRow(i);
    }
    vector<Pasajero>::iterator pasajeros = (*it).Pasajeros.begin();
    while(pasajeros != (*it).Pasajeros.end()){
        QTableWidgetItem* Nombre = new QTableWidgetItem();
        QTableWidgetItem* Apellido = new QTableWidgetItem();
        QTableWidgetItem* Asiento = new QTableWidgetItem();
        Nombre->setText(QString::fromStdString((*pasajeros).getNombre()));
        Apellido->setText(QString::fromStdString((*pasajeros).getApellido()));
        Asiento->setText(QString::fromStdString((*pasajeros).getAsiento()));
        Nombre->setFlags(Nombre->flags() ^ Qt::ItemIsEditable);
        Apellido->setFlags(Apellido->flags() ^ Qt::ItemIsEditable);
        Asiento->setFlags(Asiento->flags() ^ Qt::ItemIsEditable);
        Nombre->setTextAlignment(Qt::AlignHCenter);
        Apellido->setTextAlignment(Qt::AlignHCenter);
        Asiento->setTextAlignment(Qt::AlignHCenter);
        const int i = ui->TablaPasajeros->rowCount();
        ui->TablaPasajeros->insertRow(i);
        ui->TablaPasajeros->setItem(i,0,Nombre);
        ui->TablaPasajeros->setItem(i,1,Apellido);
        ui->TablaPasajeros->setItem(i,2,Asiento);
        pasajeros++;
    }
}
开发者ID:Donluigimx,项目名称:Proyecto_Algoritmia,代码行数:30,代码来源:Pasajeros.cpp

示例13: QWidget

CurrencyPane::CurrencyPane(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::CurrencyPane)
{
    ui->setupUi(this);

    currency = QStringList({"Scroll of Wisdom",
                            "Portal Scroll",
                            "Armourer's Scrap",
                            "Blacksmith's Whetstone",
                            "Glassblower's Bauble",
                            "Cartographer's Chisel",
                            "Gemcutter's Prism",
                            "Jeweller's Orb",
                            "Chromatic Orb",
                            "Orb of Fusing",
                            "Orb of Transmutation",
                            "Orb of Chance",
                            "Orb of Alchemy",
                            "Regal Orb",
                            "Orb of Augmentation",
                            "Exalted Orb",
                            "Orb of Alteration",
                            "Chaos Orb",
                            "Blessed Orb",
                            "Divine Orb",
                            "Orb of Scouring",
                            "Mirror of Kalandra",
                            "Orb of Regret",
                            "Vaal Orb",
                            "Eternal Orb"});


    ui->currencyTable->setTabKeyNavigation(true);

    ui->currencyTable->verticalHeader()->show();
    ui->currencyTable->blockSignals(true);
    for (QString currencyItem : currency) {
        int row = ui->currencyTable->rowCount();
        ui->currencyTable->insertRow(row);
        QTableWidgetItem* item = new QTableWidgetItem(currencyItem);
        ui->currencyTable->setVerticalHeaderItem(row, item);
        item = new QTableWidgetItem("0");
        item->setFlags(item->flags() & ~Qt::ItemIsEditable);
        ui->currencyTable->setItem(row, 0, item);
        ui->currencyTable->setItem(row, 1, new QTableWidgetItem("0"));

        // Generate cell widget!
        RatioCell* cell = new RatioCell(ui->currencyTable);
        ui->currencyTable->setCellWidget(row, 1, cell);
        connect(cell, &RatioCell::editingFinished, this, &CurrencyPane::UpdateItemChaosValues);

        item = new QTableWidgetItem("0");
        item->setFlags(item->flags() & ~Qt::ItemIsEditable);
        ui->currencyTable->setItem(row, 2, item);
    }
    ui->currencyTable->blockSignals(false);
    ui->currencyTable->update();
}
开发者ID:JxMRS,项目名称:acquisitionplus,代码行数:59,代码来源:currencypane.cpp

示例14: QTableWidget

// ------------------------------------------------------------------------
QWidget * DicomParser::createTable()
{
	// create the table and the headers
	table = new QTableWidget(this);

	QStringList headers;
	headers << "Series Name";
	headers << "Number";
	headers << "Number";
	headers << "Study";
	headers << "Include";

	table->setRowCount(this->series.size());
	table->setColumnCount(5);
	table->setHorizontalHeaderLabels(headers);
	table->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
	table->setSelectionMode(QAbstractItemView::SingleSelection);
	table->setSelectionBehavior(QAbstractItemView::SelectRows);
	table->setShowGrid(false);



	double start = posString(seriesAgain.front().images.front());
	double last = 0.0;
	for(unsigned int i = 0; i < seriesAgain.size(); i++)
	{
		QString name = QString::fromStdString(seriesAgain[i].description);
		QTableWidgetItem * item = new QTableWidgetItem(name);		
		item->setFlags(item->flags()^Qt::ItemIsEditable);
		table->setItem(i,0,item);

		double pos = posString(seriesAgain[i].images[0]);
		double diff = pos - start;
		double comp = pos - last;
		last = pos;
		std::stringstream ssp;
		ssp << diff  << " - " << comp;
		QTableWidgetItem * number = new QTableWidgetItem(QString::number(seriesAgain[i].images[0].seriesNumber));
		QTableWidgetItem * num = new QTableWidgetItem(QString::fromStdString(ssp.str()));
		QTableWidgetItem * study = new QTableWidgetItem(QString::fromStdString(seriesAgain[i].images[0].studyUID));

		num->setFlags(item->flags());
		table->setItem(i,3, study);
		table->setItem(i,2,num);
		table->setItem(i,1,number);


		QTableWidgetItem * check = new QTableWidgetItem;
		check->setCheckState(Qt::Unchecked);
		check->setFlags(item->flags() ^ Qt::ItemIsUserCheckable);
		table->setItem(i,4, check);
	}

	table->resizeColumnToContents(3);

	return table;
}
开发者ID:zhuangfangwang,项目名称:PhDProject,代码行数:58,代码来源:dicom_parser.cpp

示例15: populate_list

// Function to populate the data tree
void US_XpnRunAuc::populate_list()
{
   QFont tw_font( US_Widgets::fixedFont().family(),
                  US_GuiSettings::fontSize() );
   QFontMetrics* fm = new QFontMetrics( tw_font );
   int rowht        = fm->height() + 2;
   tw->setFont   ( tw_font );
   tw->setPalette( US_GuiSettings::editColor() );
   tw->setRowCount( runInfo.count() );

   QStringList headers;
   headers << tr( "Run" ) << tr( "Date" ) << tr( "Triples Count" );

   tw->setHorizontalHeaderLabels( headers );
   tw->verticalHeader()->hide();
   tw->setShowGrid( false );
   tw->setSelectionBehavior( QAbstractItemView::SelectRows );
   tw->setMinimumWidth ( 100 );
   tw->setMinimumHeight( 100 );
   tw->setColumnWidth( 0, 250 );
   tw->setColumnWidth( 1, 150 );
   tw->setColumnWidth( 2,  50 );
   tw->setSortingEnabled( false );
   tw->clearContents();

   // Now load the table, marking each as not-editable
   for ( int ii = 0; ii < runInfo.size(); ii++ )
   {
      QTableWidgetItem* item;
      RunInfo rr     = runInfo[ ii ];
      QString tripk  = QString().sprintf( "%5d", rr.ntriple );

      item           = new QTableWidgetItem( rr.runID );
      item->setFlags( item->flags() ^ Qt::ItemIsEditable );
      tw  ->setItem(  ii, 0, item );

      item           = new QTableWidgetItem( rr.date );
      item->setFlags( item->flags() ^ Qt::ItemIsEditable );
      tw  ->setItem(  ii, 1, item );

      item           = new QTableWidgetItem( tripk );
      item->setFlags( item->flags() ^ Qt::ItemIsEditable );
      tw  ->setItem(  ii, 2, item );
//qDebug() << "setItems ii" << ii << "ID date runID label"
// << rr.ID << rr.date << rr.runID << rr.label;

      tw  ->setRowHeight( ii, rowht );
   }

   tw->setSortingEnabled( true );
   tw->sortByColumn( 1, Qt::DescendingOrder );
   tw->resizeColumnsToContents();
   tw->adjustSize();
   tw->resize( size().width() - 4, tw->size().height() );
   qApp->processEvents();
}
开发者ID:svn2github,项目名称:UltraScan3,代码行数:57,代码来源:us_xpn_run_auc.cpp


注:本文中的QTableWidgetItem::flags方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。