本文整理汇总了C++中QToolBar::setStyleSheet方法的典型用法代码示例。如果您正苦于以下问题:C++ QToolBar::setStyleSheet方法的具体用法?C++ QToolBar::setStyleSheet怎么用?C++ QToolBar::setStyleSheet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QToolBar
的用法示例。
在下文中一共展示了QToolBar::setStyleSheet方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QLabel
void BitcoinGUI::createToolBars2()
{
QLabel *mylabel = new QLabel (this);
mylabel->setPixmap(QPixmap(":images/head"));
mylabel->show();
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
toolbar->setObjectName("toolbar");
addToolBar(Qt::LeftToolBarArea,toolbar);
toolbar->setOrientation(Qt::Vertical);
toolbar->setMovable( false );
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar->setIconSize(QSize(50,25));
toolbar->addWidget(mylabel);
toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
toolbar->addAction(addressBookAction);
toolbar->addAction(blockAction);
toolbar->addAction(statisticsAction);
toolbar->addAction(optionsAction);
QWidget* spacer = new QWidget();
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
toolbar->addWidget(spacer);
spacer->setObjectName("spacer");
toolbar->setStyleSheet(
"#toolbar { font-weight:600;border:none;height:100%;padding-top:20px; background: rgb(37,40,46); text-align: left; color: white;min-width:180px;max-width:180px;}"
"QToolBar QToolButton:hover {background:rgb(28,29,33);}"
"QToolBar QToolButton:checked {background:rgba(28,29,33,100);}"
"QToolBar QToolButton { font-weight:600;font-size:10px;font-family:'Century Gothic';padding-left:20px;padding-right:181px;padding-top:5px;padding-bottom:5px; width:100%; color: white; text-align: left; background:transparent;text-transform:uppercase; }");
wId = new QWidget(this);
wId3 = new QWidget(this);
QToolBar *toolbars = addToolBar(tr("Settings2"));
addToolBar(Qt::RightToolBarArea,toolbars);
toolbars->setOrientation(Qt::Horizontal);
toolbars->setMovable( false );
toolbars->setStyleSheet("QToolBar QToolButton {border:0px;margin-right:3px} QToolBar{ border:0px; }");
toolbars->setIconSize(QSize(102,25));
QHBoxLayout *vbox5 = new QHBoxLayout();
vbox5->addWidget(toolbars);
vbox5->setContentsMargins(0,0,0,0);
wId3->setFixedSize(250,30);
wId3->move(260,10);
wId3->setLayout(vbox5);
wId3->setFocus();
wId3->raise();
QMenu *menu = new QMenu(tr("Mini"));
menu->setStyleSheet("border:none;background:none;");
menu->addAction(toggleHideAction);
menu->menuAction()->setIcon(QIcon(":/icons/mini"));
QHBoxLayout *vbox3 = new QHBoxLayout();
vbox3->setContentsMargins(0,0,0,0);
wId->setFixedSize(120,40);
wId->move(915,1);
wId->setLayout(vbox3);
wId->setFocus();
}
示例2: createToolBars
void BitcoinGUI::createToolBars()
{
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
toolbar->setObjectName("toolbar");
addToolBar(Qt::LeftToolBarArea,toolbar);
toolbar->setOrientation(Qt::Vertical);
toolbar->setMovable( false );
toolbar->setToolButtonStyle(Qt::ToolButtonTextOnly);
QLabel *l = new QLabel(this);
l->setPixmap(QPixmap(":/images/spacer"));
toolbar->addWidget(l);
toolbar->addAction(overviewAction);
toolbar->addAction(statisticsAction);
toolbar->addAction(blockAction);
toolbar->addAction(chatAction);
#ifdef ENABLE_TRADE_REQUIRE_QT5
toolbar->addAction(TradingAction);
#endif
// toolbar->addAction(radioAction);
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
toolbar->addAction(addressBookAction);
toolbar->setStyleSheet("#toolbar { border:1px;height:100%;padding-top:100px; background: transparent; text-align: center; color: #4DD0F0;min-width:200px;max-width:200px;} QToolBar QToolButton:hover {background-image: url(:images/1); background-color: transparent;} QToolBar QToolButton:selected {background-color: transparent;} QToolBar QToolButton:checked {background-image: url(:images/2); background-color: transparent;} QToolBar QToolButton:pressed {background-color: transparent;} QToolBar QToolButton { margin: 2px; background-image:url(:images/3); font-family:'Bebas'; font-size:14px; min-width:160px;max-width:160px; min-height:40px;max-height:40px; color: white; text-align: center; }");
}
示例3: createToolBars
void BitcoinGUI::createToolBars()
{
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
toolbar->setObjectName("toolbar");
addToolBar(Qt::LeftToolBarArea,toolbar);
toolbar->setOrientation(Qt::Vertical);
toolbar->setFixedWidth(205);
toolbar->setMovable( false );
toolbar->setToolButtonStyle(Qt::ToolButtonTextOnly);
QLabel* header = new QLabel();
header->setMinimumSize(156,156);
header->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
header->setPixmap(QPixmap(":/images/header"));
header->setMaximumSize(156,156);
header->setContentsMargins(26,26,0,0);
header->setScaledContents(true);
toolbar->addWidget(header);
QLabel *l = new QLabel(this);
l->setPixmap(QPixmap(":/images/spacer"));
toolbar->addWidget(l);
toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
toolbar->addAction(addressBookAction);
toolbar->setStyleSheet("#toolbar {background: transparent; text-align: center; color: black;padding-right: 30px;} QToolBar QToolButton:hover {background-color: transparent;} QToolBar QToolButton:selected {background-color: transparent;} QToolBar QToolButton:checked {background-color: transparent;} QToolBar QToolButton:pressed {background-color: transparent;} QToolBar QToolButton {font-family:Steps; font-size:15px; font-weight: bold; min-width:125px;max-width:125px; min-height:25px;max-height:25px; color: white; text-align: left; }");
}
示例4: QWidget
EditWidget::EditWidget(IMessageWidgets *AMessageWidgets, IMessageWindow *AWindow, QWidget *AParent) : QWidget(AParent)
{
ui.setupUi(this);
ui.medEditor->setWordWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
FWindow = AWindow;
FMessageWidgets = AMessageWidgets;
FBufferPos = -1;
FSendEnabled = true;
FEditEnabled = true;
setRichTextEnabled(false);
QToolBar *toolBar = new QToolBar;
toolBar->setMovable(false);
toolBar->setFloatable(false);
toolBar->setIconSize(QSize(16,16));
toolBar->layout()->setMargin(0);
toolBar->setStyleSheet("QToolBar { border: none; }");
toolBar->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred);
FEditToolBar = new ToolBarChanger(toolBar);
FEditToolBar->setMinimizeWidth(true);
FEditToolBar->setSeparatorsVisible(false);
connect(FEditToolBar,SIGNAL(itemRemoved(QAction *)),SLOT(onUpdateEditToolBarVisibility()));
connect(FEditToolBar,SIGNAL(itemInserted(QAction *, QAction *, Action *, QWidget *, int)),SLOT(onUpdateEditToolBarVisibility()));
ui.wdtSendToolBar->setLayout(new QHBoxLayout);
ui.wdtSendToolBar->layout()->setMargin(0);
ui.wdtSendToolBar->layout()->addWidget(toolBar);
FSendAction = new Action(toolBar);
FSendAction->setToolTip(tr("Send"));
FSendAction->setIcon(RSR_STORAGE_MENUICONS,MNI_MESSAGEWIDGETS_SEND);
connect(FSendAction,SIGNAL(triggered(bool)),SLOT(onSendActionTriggered(bool)));
FEditToolBar->insertAction(FSendAction,TBG_MWEWTB_SENDMESSAGE);
ui.medEditor->installEventFilter(this);
ui.medEditor->setContextMenuPolicy(Qt::CustomContextMenu);
Shortcuts::insertWidgetShortcut(SCT_MESSAGEWINDOWS_EDITNEXTMESSAGE,ui.medEditor);
Shortcuts::insertWidgetShortcut(SCT_MESSAGEWINDOWS_EDITPREVMESSAGE,ui.medEditor);
connect(ui.medEditor,SIGNAL(createDataRequest(QMimeData *)),SLOT(onEditorCreateDataRequest(QMimeData *)));
connect(ui.medEditor,SIGNAL(canInsertDataRequest(const QMimeData *, bool &)),
SLOT(onEditorCanInsertDataRequest(const QMimeData *, bool &)));
connect(ui.medEditor,SIGNAL(insertDataRequest(const QMimeData *, QTextDocument *)),
SLOT(onEditorInsertDataRequest(const QMimeData *, QTextDocument *)));
connect(ui.medEditor->document(),SIGNAL(contentsChange(int,int,int)),SLOT(onEditorContentsChanged(int,int,int)));
connect(ui.medEditor,SIGNAL(customContextMenuRequested(const QPoint &)),SLOT(onEditorCustomContextMenuRequested(const QPoint &)));
onOptionsChanged(Options::node(OPV_MESSAGES_EDITORAUTORESIZE));
onOptionsChanged(Options::node(OPV_MESSAGES_EDITORMINIMUMLINES));
connect(Options::instance(),SIGNAL(optionsChanged(const OptionsNode &)),SLOT(onOptionsChanged(const OptionsNode &)));
connect(Shortcuts::instance(),SIGNAL(shortcutUpdated(const QString &)),SLOT(onShortcutUpdated(const QString &)));
connect(Shortcuts::instance(),SIGNAL(shortcutActivated(const QString &, QWidget *)),SLOT(onShortcutActivated(const QString &, QWidget *)));
onUpdateEditToolBarVisibility();
}
示例5: createToolBar
void lmcChatRoomWindow::createToolBar(void) {
QToolBar* pLeftBar = new QToolBar(ui.wgtToolBar);
pLeftBar->setStyleSheet("QToolBar { border: 0px }");
pLeftBar->setIconSize(QSize(16, 16));
ui.toolBarLayout->addWidget(pLeftBar);
pFontAction = pLeftBar->addAction(QIcon(QPixmap(IDR_FONT, "PNG")), "Change Font...",
this, SLOT(btnFont_clicked()));
pFontColorAction = pLeftBar->addAction(QIcon(QPixmap(IDR_FONTCOLOR, "PNG")), "Change Color...",
this, SLOT(btnFontColor_clicked()));
pLeftBar->addSeparator();
pbtnSmiley = new lmcToolButton(pLeftBar);
pbtnSmiley->setIcon(QIcon(QPixmap(IDR_SMILEY, "PNG")));
pbtnSmiley->setPopupMode(QToolButton::InstantPopup);
pbtnSmiley->setMenu(pSmileyMenu);
pLeftBar->addWidget(pbtnSmiley);
pLeftBar->addSeparator();
pSaveAction = pLeftBar->addAction(QIcon(QPixmap(IDR_SAVE, "PNG")), "&Save As...", this, SLOT(btnSave_clicked()));
pSaveAction->setShortcut(QKeySequence::Save);
pSaveAction->setEnabled(false);
ui.lblDividerTop->setBackgroundRole(QPalette::Light);
ui.lblDividerTop->setAutoFillBackground(true);
ui.lblDividerBottom->setBackgroundRole(QPalette::Dark);
ui.lblDividerBottom->setAutoFillBackground(true);
if(groupMode) {
QToolBar* pContactsBar = new QToolBar(ui.wgtContactsBar);
pContactsBar->setStyleSheet("QToolBar { border: 0px }");
pContactsBar->setIconSize(QSize(24, 24));
ui.contactsBarLayout->addWidget(pContactsBar);
addContactAction = pContactsBar->addAction(QIcon(QPixmap(IDR_ADDCONTACT, "PNG")), "&Add Contacts...",
this, SLOT(addContactAction_triggered()));
QToolButton* pButton = (QToolButton*)pContactsBar->widgetForAction(addContactAction);
pButton->setAutoRaise(false);
}
}
示例6: createToolBars
void VegascoinGUI::createToolBars()
{
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
toolbar->addAction(addressBookAction);
toolbar->setStyleSheet("background-color:black; color:white;");
}
示例7: createToolbar
void MainWindow::createToolbar()
{
//
// Main toolbar
//
QToolBar* toolbar = new QToolBar("File Toolbar");
toolbar->addAction(QIcon(":/icons/new.png"), "New", this, SLOT(newFile()));
toolbar->addAction(QIcon(":/icons/open.png"), "Open", this, SLOT(openFile()));
mActionsRequiringFiles.append(toolbar->addAction(QIcon(":/icons/save.png"), "Save", this, SLOT(saveFile())));
toolbar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
addToolBar(toolbar);
registerContextMenuItem(toolbar);
toolbar->setObjectName("File Toolbar");
QWidget* spacer = new QWidget();
spacer->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Expanding);
toolbar->addWidget(spacer);
toolbar->setStyleSheet("QToolBar { margin: 0px; padding: 0px; spacing: 3px; }");
toolbar->setStyleSheet("QToolButton { margin: 0px; padding: 0px; width:22px; height:22px }");
//
// View toolbar
//
toolbar = new QToolBar("View Toolbar");
mActionsRequiringFiles.append(toolbar->addAction(QIcon(":/icons/verticalsplit.png"), "Split View Vertically", gWindowManager, SLOT(splitVertically())));
mActionsRequiringFiles.append(toolbar->addAction(QIcon(":/icons/horizontalsplit.png"), "Split View Horizontally", gWindowManager, SLOT(splitHorizontally())));
mActionsRequiringSplitViews.append(toolbar->addAction(QIcon(":/icons/removesplit.png"), "Remove Split", gWindowManager, SLOT(removeSplit())));
addToolBar(toolbar);
registerContextMenuItem(toolbar);
toolbar->setObjectName("View Toolbar");
toolbar->setStyleSheet("QToolBar { margin: 0px; padding: 0px; spacing: 3px; }");
toolbar->setStyleSheet("QToolButton { margin: 0px; padding: 0px; width:22px; height:22px }");
}
示例8: QWidget
UserBrokerTransactionsWidget::UserBrokerTransactionsWidget(QTabFramework& tabFramework, QSettings& settings, Entity::Manager& entityManager, DataService& dataService) :
QWidget(&tabFramework), tabFramework(tabFramework), entityManager(entityManager), dataService(dataService), transactionsModel(entityManager)
{
entityManager.registerListener<EConnection>(*this);
setWindowTitle(tr("Transactions"));
QToolBar* toolBar = new QToolBar(this);
toolBar->setStyleSheet("QToolBar { border: 0px }");
toolBar->setIconSize(QSize(16, 16));
toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
refreshAction = toolBar->addAction(QIcon(":/Icons/arrow_refresh.png"), tr("&Refresh"));
refreshAction->setEnabled(false);
refreshAction->setShortcut(QKeySequence(QKeySequence::Refresh));
connect(refreshAction, SIGNAL(triggered()), this, SLOT(refresh()));
transactionView = new QTreeView(this);
transactionView->setUniformRowHeights(true);
proxyModel = new UserBrokerTransactionsSortProxyModel(this);
proxyModel->setSourceModel(&transactionsModel);
proxyModel->setDynamicSortFilter(true);
transactionView->setModel(proxyModel);
transactionView->setSortingEnabled(true);
transactionView->setRootIsDecorated(false);
transactionView->setAlternatingRowColors(true);
//transactionView->setSelectionMode(QAbstractItemView::ExtendedSelection);
QVBoxLayout* layout = new QVBoxLayout;
layout->setMargin(0);
layout->setSpacing(0);
layout->addWidget(toolBar);
layout->addWidget(transactionView);
setLayout(layout);
QHeaderView* headerView = transactionView->header();
headerView->resizeSection(0, 50);
headerView->resizeSection(1, 110);
headerView->resizeSection(2, 85);
headerView->resizeSection(3, 100);
headerView->resizeSection(4, 85);
headerView->resizeSection(5, 75);
headerView->resizeSection(6, 85);
transactionView->sortByColumn(1);
settings.beginGroup("Transactions");
headerView->restoreState(settings.value("HeaderState").toByteArray());
settings.endGroup();
headerView->setStretchLastSection(false);
headerView->setResizeMode(0, QHeaderView::Stretch);
}
示例9: addControlItems
void ProfileGraphicsView::addControlItems()
{
QAction *scaleAction = new QAction(QIcon(":scale"), tr("Scale"), this);
QAction *rulerAction = new QAction(QIcon(":ruler"), tr("Ruler"), this);
QToolBar *toolBar = new QToolBar("", 0);
toolBar->addAction(rulerAction);
toolBar->addAction(scaleAction);
//make toolbar transparent
toolBar->setStyleSheet(QString::fromUtf8 ("background-color: rgba(255,255,255,0);"));
connect(scaleAction, SIGNAL(triggered()), this, SLOT(on_scaleAction()));
connect(rulerAction, SIGNAL(triggered()), this, SLOT(on_rulerAction()));
toolBarProxy = scene()->addWidget(toolBar);
//Put it into the lower right corner of the profile
toolBarProxy->setPos(gc.maxx-toolBar->width(), gc.maxy-toolBar->height());
}
示例10: QWidget
/******************************************************************************
* Initializes the command panel page.
******************************************************************************/
RenderCommandPage::RenderCommandPage(MainWindow* mainWindow, QWidget* parent) : QWidget(parent)
{
QVBoxLayout* layout = new QVBoxLayout(this);
layout->setContentsMargins(2,2,2,2);
QToolBar* toolbar = new QToolBar(this);
toolbar->setStyleSheet("QToolBar { padding: 0px; margin: 0px; border: 0px none black; }");
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
layout->addWidget(toolbar);
toolbar->addAction(mainWindow->actionManager()->getAction(ACTION_RENDER_ACTIVE_VIEWPORT));
// Create the properties panel.
propertiesPanel = new PropertiesPanel(this);
propertiesPanel->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
layout->addWidget(propertiesPanel, 1);
connect(&mainWindow->datasetContainer(), &DataSetContainer::dataSetChanged, this, &RenderCommandPage::onDataSetChanged);
}
示例11: createToolBars
void BitcoinGUI::createToolBars()
{
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
toolbar->addAction(addressBookAction);
QToolBar *toolbar2 = addToolBar(tr("Actions toolbar"));
toolbar2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar2->addAction(exportAction);
toolbar->setObjectName("toolbarMain");
toolbar2->setObjectName("toolbarExport");
toolbar->setStyleSheet("QToolButton:hover { border: 2px solid #42D6FF; } QToolButton:checked { border: 2px solid #3ABEE5; } #toolbarMain { background-image: url(:icons/subtlecarbon);background-repeat: repeat-xy;border: 2px solid #101010;} QToolTip { color: #fff; background-color: #202020; border: none; }");
toolbar2->setStyleSheet("QToolButton:hover { border: 2px solid #42D6FF; } QToolButton:checked { border: 2px solid #3ABEE5; } #toolbarExport { background-image: url(:icons/subtlecarbon);background-repeat: repeat-xy;border: 2px solid #101010;} QToolTip { color: #fff; background-color: #202020; border: none; }");
}
示例12: createToolBars
void BitcreditGUI::createToolBars()
{
QLabel *mylabel = new QLabel(this);
mylabel->setPixmap(QPixmap(":images/head"));
mylabel->show();
QToolBar *toolbar = addToolBar(tr("Menu"));
toolbar->setObjectName("toolbar");
addToolBar(Qt::LeftToolBarArea, toolbar);
toolbar->addWidget(mylabel);
toolbar->setOrientation(Qt::Vertical);
toolbar->setMovable(false);
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar->setIconSize(QSize(50,20));
if(walletFrame)
{
toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
toolbar->addAction(exchangeAction);
toolbar->addAction(blockAction);
toolbar->addAction(bankstatsAction);
toolbar->addAction(sendMessagesAction);
toolbar->addAction(messageAction);
toolbar->addAction(invoiceAction);
toolbar->addAction(receiptAction);
toolbar->addAction(voteCoinsAction);
toolbar->addAction(chatAction);
overviewAction->setChecked(true);
}
//QWidget* spacer = new QWidget();
// spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
// toolbar->addWidget(spacer);
toolbar->addAction(optionsAction);
//spacer->setObjectName("spacer");
toolbar->setStyleSheet("#toolbar { font-weight:600;border:none;height:100%;padding-top:20px; background: rgb(0, 0, 0); text-align: left; color: white;min-width:180px;max-width:180px;} QToolBar QToolButton:hover {background:rgb(28, 29, 33);} QToolBar QToolButton:checked {background:rgba(28, 29, 33, 100);} QToolBar QToolButton { font-weight:600;font-size:10px;font-family:'Century Gothic';padding-left:20px;padding-right:181px;padding-top:4px;padding-bottom:4px; width:100%; color: white; text-align: left; background:transparent;text-transform:uppercase; }");
}
示例13: QWidget
DownloadManager::DownloadManager(QWidget *parent)
: QWidget(parent)
{
listWidget_ = new QListWidget();
listWidget_->setFrameStyle(QFrame::NoFrame);
listClaerAct_ = new QAction(QIcon(":/images/list_clear"), tr("Clear"), this);
QToolBar *toolBar = new QToolBar(this);
toolBar->setObjectName("newsToolBar");
toolBar->setStyleSheet("QToolBar { border: none; padding: 0px; }");
toolBar->setIconSize(QSize(18, 18));
toolBar->addAction(listClaerAct_);
QHBoxLayout *buttonLayout = new QHBoxLayout();
buttonLayout->setMargin(2);
buttonLayout->addWidget(toolBar);
QWidget *buttonPanelWidget = new QWidget(this);
buttonPanelWidget->setObjectName("buttonPanelWidget");
buttonPanelWidget->setStyleSheet(
QString("#buttonPanelWidget {border-bottom: 1px solid %1;}").
arg(qApp->palette().color(QPalette::Dark).name()));
buttonPanelWidget->setLayout(buttonLayout);
QVBoxLayout *mainLayout = new QVBoxLayout();
mainLayout->setMargin(0);
mainLayout->setSpacing(0);
mainLayout->addWidget(buttonPanelWidget);
mainLayout->addWidget(listWidget_);
setLayout(mainLayout);
connect(listClaerAct_, SIGNAL(triggered()), this, SLOT(clearList()));
connect(this, SIGNAL(signalItemCreated(QListWidgetItem*,DownloadItem*)),
this, SLOT(itemCreated(QListWidgetItem*,DownloadItem*)));
connect(&updateInfoTimer_, SIGNAL(timeout()), this, SLOT(updateInfo()));
updateInfoTimer_.start(2000);
hide();
}
示例14: createToolBars
void BitcoinGUI::createToolBars()
{
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
toolbar->addAction(addressBookAction);
QToolBar *toolbar2 = addToolBar(tr("Actions toolbar"));
toolbar2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar2->addAction(lockWalletToggleAction);
toolbar2->addAction(exportAction);
toolbar->setObjectName("tabsToolbar");
toolbar2->setObjectName("actionsToolbar");
toolbar->setStyleSheet("QToolButton { min-height:36px;color:#ffffff;border:none;margin:0px;padding:0px;} QToolButton:hover { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5d3fdf, stop:1.0 #5d3fdf); margin:0px; padding:0px; border:none; } QToolButton:checked { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #8b12d0, stop:1.0 #7412d0); margin:0px; padding:0px; border-right-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #ffffff, stop:0.5 #ffffff, stop:1.0 #ffffff);border-right-width:1px;border-right-style:inset; border-left-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #ffffff, stop:0.5 #ffffff, stop:1.0 #ffffff);border-left-width:1px;border-left-style:inset; } QToolButton:pressed { color: #ccffcc; background-color: qlineargradie x2:0, y2:1, stop:0 #8b12d0, stop:1.0 #7412D0); margin:0px; padding:nt(spread:pad, x1:0, y1:0,0px; border:none;} QToolButton:selected { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #ffffff, stop:1.0 #ffffff); margin:0px;padding:0px;border:none; } #tabsToolbar { min-height:48px; color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #8b12d0, stop:1.0 #7412D0); margin:0px; padding:0px; border-top-color: rgba(160, 160, 160, 191); border-top-width: 1px; border-top-style: inset; } QToolBar::handle { background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #8b12d0, stop:1.0 #7412D0); }");
toolbar2->setStyleSheet("QToolButton { min-height:36px;color:#ffffff;border:none;margin:0px;padding:0px;} QToolButton:hover { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #8b12d0, stop:1.0 #7412D0); margin:0px; padding:0px; border:none; } QToolButton:checked { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #8b12d0, stop:1.0 #7412D0); margin:0px; padding:0px; border-right-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #ffffff, stop:0.5 #ffffff, stop:1.0 #ffffff);border-right-width:1px;border-right-style:inset; border-left-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #ffffff, stop:0.5 #ffffff, stop:1.0 #ffffff);border-left-width:1px;border-left-style:inset; } QToolButton:pressed { color: #ccffcc; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #8b12d0, stop:1.0 #7412D0); margin:0px; padding:0px; border:none;} QToolButton:selected { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #474748, stop:1.0 #353536); margin:0px;padding:0px;border:none; } #actionsToolbar { min-height:48px; color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #8b12d0, stop:1.0 #7412D0); margin:0px; padding:0px; border-top-color: rgba(160, 160, 160, 191); border-top-width: 1px; border-top-style: inset; } QToolBar::handle { background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #8b12d0, stop:1.0 #7412D0); }");
}
示例15: createToolBars
void BitcoinGUI::createToolBars()
{
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
toolbar->addAction(addressBookAction);
QToolBar *toolbar2 = addToolBar(tr("Actions toolbar"));
toolbar2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar2->addAction(lockWalletToggleAction);
toolbar2->addAction(exportAction);
toolbar->setObjectName("tabsToolbar");
toolbar2->setObjectName("actionsToolbar");
toolbar->setStyleSheet("QToolButton { min-height:48px;color:#ffffff;border:none;margin:0px;padding:0px;} QToolButton:hover { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #8E8F8F, stop:1.0 #7E7F81); margin:0px; padding:0px; border:none; } QToolButton:checked { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #474748, stop:1.0 #353536); margin:0px; padding:0px; border-right-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #3b3b3b, stop:0.5 #6c6c6f, stop:1.0 #6c6c6f);border-right-width:2px;border-right-style:inset; border-left-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #6c6c6f, stop:0.5 #6c6c6f, stop:1.0 #3b3b3b);border-left-width:2px;border-left-style:inset; } QToolButton:pressed { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #474748, stop:1.0 #353536); margin:0px; padding:0px; border:none;} QToolButton:selected { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #474748, stop:1.0 #353536); margin:0px;padding:0px;border:none; } #tabsToolbar { min-height:48px; color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #6e6e71, stop:1.0 #4e4e4f); margin:0px; padding:0px; border-top-color: rgba(160, 160, 160, 191); border-top-width: 1px; border-top-style: inset; } QToolBar::handle { background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #6e6e71, stop:1.0 #4e4e4f); }");
toolbar2->setStyleSheet("QToolButton { min-height:48px;color:#ffffff;border:none;margin:0px;padding:0px;} QToolButton::disabled { color: #808080; } QToolButton:hover { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #7D7E7F, stop:1.0 #6D6F70); margin:0px; padding:0px; border:none; } QToolButton:checked { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #363637, stop:1.0 #242425); margin:0px; padding:0px; border-right-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #2a2a2a, stop:0.5 #5b5b5e, stop:1.0 #5b5b5e);border-right-width:2px;border-right-style:inset; border-left-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #5b5b5e, stop:0.5 #5b5b5e, stop:1.0 #2a2a2a);border-left-width:2px;border-left-style:inset; } QToolButton:pressed { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #363637, stop:1.0 #242425); margin:0px; padding:0px; border:none; border-left-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #5b5b5e, stop:0.5 #5b5b5e, stop:1.0 #2a2a2a);border-left-width:2px;border-left-style:inset;} QToolButton:selected { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #363637, stop:1.0 #242425); margin:0px;padding:0px;border:none; } #actionsToolbar { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5D5D60, stop:1.0 #3D3D3F); margin:0px; padding:0px; border-top-color: rgba(160, 160, 160, 191); border-top-width: 1px; border-top-style: inset; } QToolBar::handle { background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5D5D60, stop:1.0 #3D3D3F); }");
}