本文整理汇总了C++中KLineEdit::isClearButtonShown方法的典型用法代码示例。如果您正苦于以下问题:C++ KLineEdit::isClearButtonShown方法的具体用法?C++ KLineEdit::isClearButtonShown怎么用?C++ KLineEdit::isClearButtonShown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KLineEdit
的用法示例。
在下文中一共展示了KLineEdit::isClearButtonShown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: shouldHaveDefaultValue
void BlackListBalooEmailCompletionWidgetTest::shouldHaveDefaultValue()
{
KPIM::BlackListBalooEmailCompletionWidget widget;
widget.show();
QTest::qWaitForWindowExposed(&widget);
QLabel *searchLabel = widget.findChild<QLabel *>(QStringLiteral("search_label"));
QVERIFY(searchLabel);
KLineEdit *searchLineEdit = widget.findChild<KLineEdit *>(QStringLiteral("search_lineedit"));
QVERIFY(searchLineEdit);
QVERIFY(searchLineEdit->isClearButtonShown());
QVERIFY(searchLineEdit->trapReturnKey());
QVERIFY(searchLineEdit->text().isEmpty());
QPushButton *seachButton = widget.findChild<QPushButton *>(QStringLiteral("search_button"));
QVERIFY(seachButton);
QVERIFY(!seachButton->isEnabled());
QLabel *moreResult = widget.findChild<QLabel *>(QStringLiteral("moreresultlabel"));
QVERIFY(moreResult);
QVERIFY(!moreResult->isVisible());
QLabel *mNumberOfEmailsFound = widget.findChild<QLabel *>(QStringLiteral("numberofemailsfound"));
QVERIFY(mNumberOfEmailsFound);
QVERIFY(mNumberOfEmailsFound->text().isEmpty());
QPushButton *showAllBlackListedEmails = widget.findChild<QPushButton *>(QStringLiteral("show_blacklisted_email_button"));
QVERIFY(showAllBlackListedEmails);
KPIM::BlackListBalooEmailList *emailList = widget.findChild<KPIM::BlackListBalooEmailList *>(QStringLiteral("email_list"));
QVERIFY(emailList);
QPushButton *selectButton = widget.findChild<QPushButton *>(QStringLiteral("select_email"));
QVERIFY(selectButton);
QVERIFY(!selectButton->isEnabled());
QPushButton *unselectButton = widget.findChild<QPushButton *>(QStringLiteral("unselect_email"));
QVERIFY(unselectButton);
QVERIFY(!unselectButton->isEnabled());
QLabel *excludeDomainLabel = widget.findChild<QLabel *>(QStringLiteral("domain_label"));
QVERIFY(excludeDomainLabel);
KLineEdit *excludeDomainLineEdit = widget.findChild<KLineEdit *>(QStringLiteral("domain_lineedit"));
QVERIFY(excludeDomainLineEdit);
QVERIFY(excludeDomainLineEdit->trapReturnKey());
QVERIFY(excludeDomainLineEdit->text().isEmpty());
QVERIFY(excludeDomainLineEdit->isClearButtonShown());
QVERIFY(!excludeDomainLineEdit->placeholderText().isEmpty());
KListWidgetSearchLine *searchInResult = widget.findChild<KListWidgetSearchLine *>(QStringLiteral("searchinresultlineedit"));
QVERIFY(searchInResult);
QVERIFY(!searchInResult->placeholderText().isEmpty());
QVERIFY(searchInResult->text().isEmpty());
QVERIFY(searchInResult->isClearButtonEnabled());
KPIM::BlackListBalooEmailWarning *blackListWarning = widget.findChild<KPIM::BlackListBalooEmailWarning *>(QStringLiteral("backlistwarning"));
QVERIFY(blackListWarning);
}