本文整理汇总了C++中QTextTable::splitCell方法的典型用法代码示例。如果您正苦于以下问题:C++ QTextTable::splitCell方法的具体用法?C++ QTextTable::splitCell怎么用?C++ QTextTable::splitCell使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QTextTable
的用法示例。
在下文中一共展示了QTextTable::splitCell方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sipNoMethod
static PyObject *meth_QTextTable_splitCell(PyObject *sipSelf, PyObject *sipArgs)
{
PyObject *sipParseErr = NULL;
{
int a0;
int a1;
int a2;
int a3;
QTextTable *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "Biiii", &sipSelf, sipType_QTextTable, &sipCpp, &a0, &a1, &a2, &a3))
{
Py_BEGIN_ALLOW_THREADS
sipCpp->splitCell(a0,a1,a2,a3);
Py_END_ALLOW_THREADS
Py_INCREF(Py_None);
return Py_None;
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_QTextTable, sipName_splitCell, doc_QTextTable_splitCell);
return NULL;
}
示例2: main
int main(int argc, char * argv[])
{
int rows = 6;
int columns = 2;
QApplication app(argc, argv);
QTextEdit *textEdit = new QTextEdit;
QTextCursor cursor(textEdit->textCursor());
cursor.movePosition(QTextCursor::Start);
QTextTableFormat tableFormat;
tableFormat.setAlignment(Qt::AlignHCenter);
tableFormat.setCellPadding(2);
tableFormat.setCellSpacing(2);
QTextTable *table = cursor.insertTable(rows, columns);
table->setFormat(tableFormat);
QTextCharFormat boldFormat;
boldFormat.setFontWeight(QFont::Bold);
QTextBlockFormat centerFormat;
centerFormat.setAlignment(Qt::AlignHCenter);
cursor.mergeBlockFormat(centerFormat);
cursor = table->cellAt(0, 0).firstCursorPosition();
cursor.insertText(("Details"), boldFormat);
cursor = table->cellAt(1, 0).firstCursorPosition();
cursor.insertText("Alan");
cursor = table->cellAt(1, 1).firstCursorPosition();
cursor.insertText("5, Pickety Street");
//! [0]
table->mergeCells(0, 0, 1, 2);
//! [0] //! [1]
table->splitCell(0, 0, 1, 1);
//! [1]
textEdit->show();
return app.exec();
}