本文整理汇总了C++中BrowserMainWindow::style方法的典型用法代码示例。如果您正苦于以下问题:C++ BrowserMainWindow::style方法的具体用法?C++ BrowserMainWindow::style怎么用?C++ BrowserMainWindow::style使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BrowserMainWindow
的用法示例。
在下文中一共展示了BrowserMainWindow::style方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: proxyAuthenticationRequired
void NetworkAccessManager::proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth)
{
BrowserMainWindow *mainWindow = BrowserApplication::instance()->mainWindow();
QDialog dialog(mainWindow);
dialog.setWindowFlags(Qt::Sheet);
Ui::ProxyDialog proxyDialog;
proxyDialog.setupUi(&dialog);
proxyDialog.iconLabel->setText(QString());
proxyDialog.iconLabel->setPixmap(mainWindow->style()->standardIcon(QStyle::SP_MessageBoxQuestion, 0, mainWindow).pixmap(32, 32));
QString introMessage = tr("<qt>Connect to proxy \"%1\" using:</qt>");
introMessage = introMessage.arg(Qt::escape(proxy.hostName()));
proxyDialog.introLabel->setText(introMessage);
proxyDialog.introLabel->setWordWrap(true);
if (dialog.exec() == QDialog::Accepted) {
auth->setUser(proxyDialog.userNameLineEdit->text());
auth->setPassword(proxyDialog.passwordLineEdit->text());
}
}
示例2: authenticationRequired
void NetworkAccessManager::authenticationRequired(QNetworkReply *reply, QAuthenticator *auth)
{
BrowserMainWindow *mainWindow = BrowserApplication::instance()->mainWindow();
QDialog dialog(mainWindow);
dialog.setWindowFlags(Qt::Sheet);
Ui::PasswordDialog passwordDialog;
passwordDialog.setupUi(&dialog);
passwordDialog.iconLabel->setText(QString());
passwordDialog.iconLabel->setPixmap(mainWindow->style()->standardIcon(QStyle::SP_MessageBoxQuestion, 0, mainWindow).pixmap(32, 32));
QString introMessage = tr("<qt>Enter username and password for \"%1\" at %2</qt>");
introMessage = introMessage.arg(Qt::escape(reply->url().toString())).arg(Qt::escape(reply->url().toString()));
passwordDialog.introLabel->setText(introMessage);
passwordDialog.introLabel->setWordWrap(true);
if (dialog.exec() == QDialog::Accepted) {
auth->setUser(passwordDialog.userNameLineEdit->text());
auth->setPassword(passwordDialog.passwordLineEdit->text());
}
}