您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ styleSheet函数代码示例

51自学网 2021-06-03 08:32:56
  C++
这篇教程C++ styleSheet函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中styleSheet函数的典型用法代码示例。如果您正苦于以下问题:C++ styleSheet函数的具体用法?C++ styleSheet怎么用?C++ styleSheet使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: setStyleSheet

void caNumeric::setColors(QColor bg, QColor fg){    if(thisColorMode == Default) {        if(!styleSheet().isEmpty()) {            setStyleSheet("");            renewStyleSheet = true;            // force resize for repainting            QResizeEvent *re = new QResizeEvent(size(), size());            resizeEvent(re);            delete re;        }        return;    }    if((bg != oldBackColor) || (fg != oldForeColor)  || renewStyleSheet || styleSheet().isEmpty()) {        renewStyleSheet = false;        QString style = "background: rgb(%1, %2, %3, %4); color: rgb(%5, %6, %7, %8);";        style = style.arg(bg.red()).arg(bg.green()).arg(bg.blue()).arg(bg.alpha()).                arg(fg.red()).arg(fg.green()).arg(fg.blue()).arg(fg.alpha());        setStyleSheet(style);        oldForeColor = fg;        oldBackColor = bg;        // force resize for repainting        QResizeEvent *re = new QResizeEvent(size(), size());        resizeEvent(re);        delete re;    }}
开发者ID:caqtdm,项目名称:caqtdm,代码行数:28,


示例2: doStyling

static void doStyling(QApplication& app){    QString ws;#ifdef Q_WS_MAC    ws = "macos";#endif // Q_WS_MAC#ifdef Q_WS_WIN    ws = "windows";#endif // Q_WS_WIN#ifdef Q_WS_X11    ws = "x11";#endif // Q_WS_X11    QFile platformCssFile(QString(":/bauhaus-%1.css").arg(ws));    platformCssFile.open(QIODevice::ReadOnly | QIODevice::Text);    QTextStream platformCssStream(&platformCssFile);    QString styleSheet(platformCssStream.readAll());    platformCssFile.close();    QFile genericCssFile(QLatin1String(":/bauhaus.css"));    genericCssFile.open(QIODevice::ReadOnly | QIODevice::Text);    QTextStream genericCssStream(&genericCssFile);    styleSheet.append(genericCssStream.readAll());    genericCssFile.close();    app.setStyleSheet(styleSheet);}
开发者ID:NoobSaibot,项目名称:qtcreator-minimap,代码行数:29,


示例3: main

int main(int argc, char *argv[]){    QApplication app(argc, argv);    QFile styleSheet(":/Flat.css");    if (styleSheet.open(QIODevice::ReadOnly))        app.setStyleSheet(styleSheet.readAll());    UsersColorsPool colorsPool;    QStringList botNames("ninjamers.servebeer.com");    ChatPanel chatPanel(botNames, &colorsPool);    chatPanel.setObjectName(QStringLiteral("ChatPanel"));    chatPanel.addMessage("UserName", "message", true);    chatPanel.addMessage("A_big_user_name_", "message", true);    chatPanel.addMessage("A_big_user_name_", "A big message text to see if the layout is working ok when users decide chat using long texts :)", true);    chatPanel.addMessage("Jamtaba", "User XXX leave the room", false);    chatPanel.addMessage("ninjamers.servebeer.com", "Welcome!", true);    chatPanel.show();    chatPanel.setMinimumHeight(600);    chatPanel.setMaximumWidth(200); //forcing the mini mode width    return app.exec();}
开发者ID:CassianoViana,项目名称:JamTaba,代码行数:26,


示例4: styleSheet

void SettingsForm::saveSettings(){	m_SoundOnGameStart = ui.optionSoundGameStart->isChecked();	settings->setValue("GameStartedSound", m_SoundOnGameStart);	m_FriendFollow = ui.optionFriendFollow->isChecked();	settings->setValue("FriendFollow", m_FriendFollow);	m_Refresh = ui.optionRefresh->isChecked();	settings->setValue("InactiveRefresh", m_Refresh);	m_Skin = ui.cmbSkin->currentText();	settings->setValue("Skin", m_Skin);	QFile styleSheet(QString("./skins/%1/style.css").arg(m_Skin));	QString style;	if(styleSheet.open(QFile::ReadOnly))	{		QTextStream styleIn(&styleSheet);		style = styleIn.readAll();		styleSheet.close();		QMainWindow* parent = (QMainWindow*)this->parent();		parent->setStyleSheet(style);		emit reloadSkin();	}	this->close();}
开发者ID:geneccx,项目名称:dcclient,代码行数:31,


示例5: VLineEdit

VVimCmdLineEdit::VVimCmdLineEdit(QWidget *p_parent)    : VLineEdit(p_parent), m_type(VVim::CommandLineType::Invalid),      m_registerPending(false), m_enableInputMethod(true){    // When user delete all the text, cancel command input.    connect(this, &VVimCmdLineEdit::textChanged,            this, [this](const QString &p_text){                if (p_text.isEmpty()) {                    emit commandCancelled();                } else {                    emit commandChanged(m_type, p_text.right(p_text.size() - 1));                }            });    connect(this, &VVimCmdLineEdit::textEdited,            this, [this](const QString &p_text){                if (p_text.size() < 2) {                    m_userLastInput.clear();                } else {                    m_userLastInput = p_text.right(p_text.size() - 1);                }            });    m_originStyleSheet = styleSheet();}
开发者ID:liunianbanbo,项目名称:vnote,代码行数:25,


示例6: main

int main(int argc, char *argv[]){    QApplication a(argc, argv);    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));    QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));    QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));    //设置日志接口    QFileLogger::InitLog();    SetLogger(new QFileLogger);    QFile styleSheet("./../qssfiles/style.qss");    if(!styleSheet.open(QIODevice::ReadOnly))    {        qWarning("style sheet load fail!");        QMessageBox::warning(NULL, QObject::tr("警告"), QObject::tr("布局文件打开失败,页面无法正常布局"));    }    a.setStyleSheet(styleSheet.readAll());    setGlobalValue(Maintain::LaneIp, "192.168.26.219");    setGlobalValue(Maintain::LanePassword, "1q2w3e");    setGlobalValue(Maintain::LaneUser, "root");    AutoUpdate updateSoftware;    if(!updateSoftware.softWareUpdate())    {        int code=QMessageBox::warning(NULL,QObject::tr("软件更新"),QObject::tr("软件更新失败:%1")                             .arg(updateSoftware.getErrorMessage()),QMessageBox::Ok);        if(code==QMessageBox::Ok)            return -1;    }    FormMain w;    LogMsg("RSU",QObject::tr("12skl;ghsirhgpuisrhgiuhipaeru"));    w.show();    return a.exec();}
开发者ID:eilin1208,项目名称:QT_Test,代码行数:32,


示例7: d

void ribi::reversi::QtReversiMenuDialog::on_button_about_clicked() noexcept{  QtAboutDialog d(MenuDialog().GetAbout());  d.setWindowIcon(windowIcon());  d.setStyleSheet(styleSheet());  ShowChild(&d);}
开发者ID:richelbilderbeek,项目名称:Reversi,代码行数:7,


示例8: QFrame

SketchMainHelpPrivate::SketchMainHelpPrivate (		const QString &viewString,		const QString &htmlText,		SketchMainHelp *parent)	: QFrame(){	setObjectName("sketchMainHelp"+viewString);	m_parent = parent;	QFrame *main = new QFrame(this);	QHBoxLayout *mainLayout = new QHBoxLayout(main);	QLabel *imageLabel = new QLabel(this);	QLabel *imageLabelAux = new QLabel(imageLabel);	imageLabelAux->setObjectName(QString("inviewHelpImage%1").arg(viewString));	QPixmap pixmap(QString(":/resources/images/helpImage%1.png").arg(viewString));	imageLabelAux->setPixmap(pixmap);	imageLabel->setFixedWidth(pixmap.width());	imageLabel->setFixedHeight(pixmap.height());	imageLabelAux->setFixedWidth(pixmap.width());	imageLabelAux->setFixedHeight(pixmap.height());	ExpandingLabel *textLabel = new ExpandingLabel(this);	textLabel->setLabelText(htmlText);	textLabel->setFixedWidth(430 - 41 - pixmap.width());	textLabel->allTextVisible();	setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);	textLabel->setToolTip("");	textLabel->setAlignment(Qt::AlignLeft);	mainLayout->setSpacing(6);	mainLayout->setMargin(2);	mainLayout->addWidget(imageLabel);	mainLayout->addWidget(textLabel);	setFixedWidth(430);	QVBoxLayout *layout = new QVBoxLayout(this);	m_closeButton = new SketchMainHelpCloseButton(viewString,this);	connect(m_closeButton, SIGNAL(clicked()), this, SLOT(doClose()));	QFrame *bottomMargin = new QFrame(this);	bottomMargin->setFixedHeight(m_closeButton->height());	layout->addWidget(m_closeButton);	layout->addWidget(main);	layout->addWidget(bottomMargin);	layout->setSpacing(0);	layout->setMargin(2);	m_shouldGetTransparent = false;	//m_closeButton->doHide();	QFile styleSheet(":/resources/styles/inviewhelp.qss");    if (!styleSheet.open(QIODevice::ReadOnly)) {		qWarning("Unable to open :/resources/styles/inviewhelp.qss");	} else {		setStyleSheet(styleSheet.readAll());	}}
开发者ID:h4ck3rm1k3,项目名称:fritzing,代码行数:60,


示例9: checkDeviceName

void DeviceWizardFinal::checkDeviceName(){    if (this->deviceName->text() == "") {        this->deviceName->setToolTip(            "Invalid Device Name. Device Name is an empty string");        this->nameOkay = false;        emit this->completeChanged();        return;    }    this->settings.beginGroup(setcon::DEVICE_GROUP);    QStringList devices = this->settings.childGroups();    for (const auto &d : devices) {        if (d == this->deviceName->text()) {            this->nameOkay = false;            emit this->completeChanged();            this->deviceName->setStyleSheet("QLineEdit {color: red;}");            this->deviceName->setToolTip(                "Invalid Device Name. The Device Name /"" + d +                "/" is already in use");            this->settings.endGroup();            return;        }    }    this->settings.endGroup();    this->deviceName->setStyleSheet(styleSheet());    this->deviceName->setToolTip("");    this->nameOkay = true;    emit this->completeChanged();}
开发者ID:crapp,项目名称:labpowerqt,代码行数:30,


示例10: styleSheet

void XLineEdit::sHandleNullStr(){  if (_nullStr.isEmpty())    return;  QString sheet = styleSheet();  QString nullStyle = " QLineEdit{ color: Grey; "                      "            font: italic; "                      "            font-size: 12px}";  if (!hasFocus() &&      text().isEmpty())  {    setText(_nullStr);    sheet.append(nullStyle);    _isNull = true;  }  else if (hasFocus() &&           sheet.contains(nullStyle))  {    clear();    sheet.remove(nullStyle);  }  else  {    _isNull = false;    sheet.remove(nullStyle);  }  setStyleSheet(sheet);}
开发者ID:dwatson78,项目名称:qt-client,代码行数:31,


示例11: QPushButton

void MainWindow::createWidgets(){    startButton = new QPushButton(tr("St&art"));    pauseOrResumeButton = new QPushButton(tr("Pa&use"));    pauseOrResumeButton->setEnabled(false);    stopButton = new QPushButton(tr("Stop"));    quitButton = new QPushButton(tr("Quit"));    QString styleSheet("background-color: bisque;");    initialCountLabel = new QLabel(tr("Initial count:"));    initialCountLabel->setStyleSheet(styleSheet);    initialCountSpinBox = new QSpinBox;    initialCountLabel->setBuddy(initialCountSpinBox);    initialCountSpinBox->setRange(1, 100);    initialCountSpinBox->setValue(60);    initialCountSpinBox->setAlignment(Qt::AlignVCenter|Qt::AlignRight);    currentCountLabel = new QLabel(tr("Current count"));    currentCountLabel->setStyleSheet(styleSheet);    currentCountLCD = new QLCDNumber;    currentCountLCD->setSegmentStyle(QLCDNumber::Flat);    currentCountLCD->setStyleSheet(styleSheet);    iterationsLabel = new QLabel(tr("Iterations"));    iterationsLabel->setStyleSheet(styleSheet);    iterationsLCD = new QLCDNumber;    iterationsLCD->setSegmentStyle(QLCDNumber::Flat);    iterationsLCD->setStyleSheet(styleSheet);    showIdsCheckBox = new QCheckBox(tr("Show I&Ds"));    showIdsCheckBox->setStyleSheet(styleSheet);    showIdsCheckBox->setChecked(true);    AQP::accelerateWidgets(QList<QWidget*>() << startButton            << stopButton << quitButton << initialCountLabel            << showIdsCheckBox);}
开发者ID:descent,项目名称:qtermwidget,代码行数:34,


示例12: globalStyleSheet

void FramelessDialog::setStyleSheetFile(const QString& fileName) {    QFile globalStyleSheet(PathUtils::resourcesPath() + "styles/global.qss");    QFile styleSheet(PathUtils::resourcesPath() + fileName);    if (styleSheet.open(QIODevice::ReadOnly) && globalStyleSheet.open(QIODevice::ReadOnly) ) {        QDir::setCurrent(PathUtils::resourcesPath());        setStyleSheet(globalStyleSheet.readAll() + styleSheet.readAll());    }}
开发者ID:ey6es,项目名称:hifi,代码行数:8,


示例13: WalletTreeView

PoolTreeView::PoolTreeView(QWidget* _parent) : WalletTreeView(_parent) {  QString styleSheetString = styleSheet();  styleSheetString.append(POOL_TREE_VIEW_STYLE_SHEET_TEMPLATE);  setStyleSheet(Settings::instance().getCurrentStyle().makeStyleSheet(styleSheetString));  setAcceptDrops(true);  viewport()->installEventFilter(this);}
开发者ID:BitcoinNero,项目名称:Archives2,代码行数:8,


示例14: MoneyEdit

PriceEdit::PriceEdit(QWidget *parent) :    MoneyEdit(parent){    setReadOnly(true);    setStyleSheet("background: rgba(255, 255, 255, 55)");    defaultStyle = styleSheet();}
开发者ID:shul20,项目名称:proprint,代码行数:8,


示例15: styleSheet

void PrintLayout::printTable() const{	QTextDocument doc;	QSizeF pageSize;	pageSize.setWidth(pageRect.width());	pageSize.setHeight(pageRect.height());	doc.setPageSize(pageSize);	QString styleSheet(		"<style type='text/css'>" /		"table {" /		"	border-width: 1px;" /		"	border-style: solid;" /		"	border-color: #999999;" /		"}" /		"th {" /		"	background-color: #eeeeee;" /		"	font-size: small;" /		"	padding: 3px 5px 3px 5px;" /		"}" /		"td {" /		"	font-size: small;" /		"	padding: 3px 5px 3px 5px;" /		"}" /		"</style>"	);	// setDefaultStyleSheet() doesn't work here?	QString htmlText = styleSheet + "<table cellspacing='0' width='100%'>";	QString htmlTextPrev;	int pageCountNew = 1, pageCount;	bool insertHeading = true;	int i;	struct dive *dive;	for_each_dive(i, dive) {		if (!dive->selected && printOptions->print_selected)			continue;		if (insertHeading) {			htmlText += insertTableHeadingRow();			insertHeading = false;		}		htmlTextPrev = htmlText;		htmlText += insertTableDataRow(dive);		doc.setHtml(htmlText);		pageCount = pageCountNew;		pageCountNew = doc.pageCount();		/* if the page count increases after adding this row we 'revert'		 * and add a heading instead. */		if (pageCountNew > pageCount) {			htmlText = htmlTextPrev;			insertHeading = true;			i--;		}	}	htmlText += "</table>";	doc.setHtml(htmlText);	doc.print(printer);}
开发者ID:kuldipem,项目名称:subsurface,代码行数:58,


示例16: setStyleSheet

void ExpandableGroupBox::setExpanded(bool e) {  _expanded=e;  // As told in Qt stylesheet reference, this force recomputation of stylesheet based on dynamic properties  setStyleSheet(styleSheet());  if (_widget) {    _widget->setVisible(e);  }}
开发者ID:mneumann,项目名称:tulip,代码行数:9,


示例17: styleSheet

//Loading qss and setting style from it--------------------------------void YouCam::setStyle(QString fname){    QFile styleSheet(fname); // load CSS file    if (!styleSheet.open(QIODevice::ReadOnly)) {        qWarning("Unable to open file");        return;    }    qApp->setStyleSheet(styleSheet.readAll()); // set own style    styleSheet.close(); //close the file}
开发者ID:keshavbhatt,项目名称:Youcam,代码行数:11,


示例18: offStyle

// visual update for the selected buttonvoid UIcolorEditor::changeLastButton(CaptureButton *b) {    if (m_lastButtonPressed != b) {        m_lastButtonPressed->setIcon(QIcon());        m_lastButtonPressed = b;        QString offStyle("QLabel { color : gray; }");        if (b == m_buttonMainColor) {            m_colorWheel->setColor(m_uiColor);            m_labelContrast->setStyleSheet(offStyle);            m_labelMain->setStyleSheet(styleSheet());        } else {            m_colorWheel->setColor(m_contrastColor);            m_labelContrast->setStyleSheet(styleSheet());            m_labelMain->setStyleSheet(offStyle);        }        b->setIcon(b->icon());    }}
开发者ID:ManuelLR,项目名称:flameshot,代码行数:20,


示例19: styleSheet

void AbstractConnectorInfoWidget::reapplyStyle() {	QString path = ":/resources/styles/partseditor.qss";	QFile styleSheet(path);	if (!styleSheet.open(QIODevice::ReadOnly)) {		qWarning("Unable to open :/resources/styles/partseditor.qss");	} else {		setStyleSheet(styleSheet.readAll());	}}
开发者ID:BrainsoftLtd,项目名称:fritzing-app,代码行数:10,


示例20: styleSheet

void MainWindow::setNomalStyle(){    QFile styleSheet(":/res/qss/wireless.qss");    if (!styleSheet.open(QIODevice::ReadOnly))    {        qWarning("Can't open the style sheet file.");        return;    }    qApp->setStyleSheet(styleSheet.readAll());}
开发者ID:Droker,项目名称:wirelessui,代码行数:10,


示例21: QMainWindow

Principal::Principal(QWidget *parent) :    QMainWindow(parent),    ui(new Ui::Principal){    ui->setupUi(this);    r = -1;    QPixmap pixmap1("icon/add.png");    QPixmap pixmap2("icon/conf.png");    QPixmap pixmap3("icon/del.png");    QPixmap pixmap4("icon/Sair.png");    QPixmap pixmap5("icon/pasta.png");    QPixmap pixmap6("icon/detalhe.png");    QIcon ButtonIcon(pixmap1);    QIcon ButtonIcon1(pixmap2);    QIcon ButtonIcon2(pixmap3);    QIcon ButtonIcon3(pixmap4);    QIcon ButtonIcon4(pixmap5);    QIcon ButtonIcon5(pixmap6);    ui->add_3->setIcon(ButtonIcon);    ui->add_3->setIconSize(pixmap1.rect().size());    ui->add_3->setStyleSheet(styleSheet().append(QString("border-image:url(icon/1.png);")));    ui->alterar->setIcon(ButtonIcon1);    ui->alterar->setIconSize(pixmap1.rect().size());    ui->alterar->setStyleSheet(styleSheet().append(QString("border-image:url(icon/1.png);")));    ui->deletar->setIcon(ButtonIcon2);    ui->deletar->setIconSize(pixmap1.rect().size());    ui->deletar->setStyleSheet(styleSheet().append(QString("border-image:url(icon/1.png);")));    ui->sair->setIcon(ButtonIcon3);    ui->sair->setIconSize(pixmap1.rect().size());    ui->sair->setStyleSheet(styleSheet().append(QString("border-image:url(icon/1.png);")));    ui->pasta->setIcon(ButtonIcon4);    ui->pasta->setIconSize(pixmap1.rect().size());    ui->pasta->setStyleSheet(styleSheet().append(QString("border-image:url(icon/1.png);")));    AnimeDao a;    if(a.getStatus() == true){        ui->statusBar->showMessage("Quantidade de Animes Cadastrados: "+QString::number(a.getLista().length()));    }    preencheTabela(a.getLista());    QPixmap pixmap9("icon/icon.png");    this->setWindowIcon(pixmap9);}
开发者ID:dyelmag,项目名称:All,代码行数:42,


示例22: styleSheet

void StyleWidget::on_transparentStyle_clicked(){    QFile styleSheet(":/files/transparent.qss");    if (!styleSheet.open(QIODevice::ReadOnly)) {        qWarning("Unable to open :/files/transparent.qss");        return;    }    qApp->setStyleSheet(styleSheet.readAll());}
开发者ID:cedrus,项目名称:qt4,代码行数:11,


示例23: setStyleSheet

void CodeViewWidget::OnSelectionChanged(){  if (m_address == PowerPC::ppcState.pc)  {    setStyleSheet(        QStringLiteral("QTableView::item:selected {background-color: #00FF00; color: #000000;}"));  }  else if (!styleSheet().isEmpty())  {    setStyleSheet(QStringLiteral(""));  }}
开发者ID:MerryMage,项目名称:dolphin,代码行数:12,


示例24: mIsHorizontal

CSVSettings::Frame::Frame (bool isVisible, const QString &title,                                                               QWidget *parent)    : mIsHorizontal (true), mLayout (new SettingLayout()),    QGroupBox (title, parent){    setFlat (true);    mVisibleBoxStyle = styleSheet();    if (!isVisible)        setStyleSheet (sInvisibleBoxStyle);    setLayout (mLayout);}
开发者ID:alisci01,项目名称:openmw,代码行数:13,


示例25: QMainWindow

ConsoleWindow::ConsoleWindow(QWidget *parent) :    QMainWindow(parent),    ui(new Ui::ConsoleWindow){    QFile styleSheet(":/resources/styles/programwindow.qss");    this->setObjectName("consoleWindow");    if (!styleSheet.open(QIODevice::ReadOnly)) {        qWarning("Unable to open :/resources/styles/programwindow.qss");    } else {        QString ss = styleSheet.readAll();#ifdef Q_OS_MAC                int paneLoc = 4;                int tabBarLoc = 0;#else                int paneLoc = -1;                int tabBarLoc = 5;#endif                ss = ss.arg(paneLoc).arg(tabBarLoc);        this->setStyleSheet(ss);    }    ui->setupUi(this);    console = new Console;    console->setEnabled(false);    setCentralWidget(console);    serial = new QSerialPort(this);    settings = new ConsoleSettings;    QSettings settings;    if (!settings.value("consolewindow/state").isNull()) {        restoreState(settings.value("consolewindow/state").toByteArray());    }    if (!settings.value("consolewindow/geometry").isNull()) {        restoreGeometry(settings.value("consolewindow/geometry").toByteArray());    }    ui->actionConnect->setEnabled(true);    ui->actionDisconnect->setEnabled(false);    ui->actionQuit->setEnabled(true);    ui->actionConfigure->setEnabled(true);    initActionsConnections();    connect(serial, SIGNAL(error(QSerialPort::SerialPortError)), this,            SLOT(handleError(QSerialPort::SerialPortError)));    connect(serial, SIGNAL(readyRead()), this, SLOT(readData()));    connect(console, SIGNAL(getData(QByteArray)), this, SLOT(writeData(QByteArray)));}
开发者ID:BrainsoftLtd,项目名称:fritzing-app,代码行数:50,


示例26: QDialog

QuoteDialog::QuoteDialog(bool full, QWidget *parent) : QDialog(parent) {    initCounts();    QFile styleSheet(":/resources/styles/fritzing.qss");    if (!styleSheet.open(QIODevice::ReadOnly)) {        DebugDialog::debug("Unable to open :/resources/styles/fritzing.qss");    } else {    	this->setStyleSheet(styleSheet.readAll());    }	setWindowTitle(tr("Fritzing Fab Quote"));	QVBoxLayout * vLayout = new QVBoxLayout(this);    QLabel * label = new QLabel(tr("Order your PCB from Fritzing Fab"));    label->setObjectName("quoteOrder");    vLayout->addWidget(label);	m_messageLabel = new QLabel(tr(""));    m_messageLabel->setObjectName("quoteMessage");	vLayout->addWidget(m_messageLabel);    m_tableWidget = new QTableWidget(3, MessageCount + 1);    m_tableWidget->setObjectName("quoteTable");    m_tableWidget->setShowGrid(false);    m_tableWidget->verticalHeader()->setVisible(false);    m_tableWidget->horizontalHeader()->setVisible(false);    #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)    m_tableWidget->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);    m_tableWidget->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);#else    m_tableWidget->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);    m_tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);#endif        m_tableWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);    m_tableWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);    m_tableWidget->setItemDelegate(new CustomDelegate(m_tableWidget));    QStringList labels;    labels << tr("Copies") << tr("Price per board") << tr("Price");    int ix = 0;    foreach (QString labl, labels) {        QTableWidgetItem * item = new QTableWidgetItem(labl);        item->setFlags(0);        m_tableWidget->setItem(ix, 0, item);        ix += 1;    }
开发者ID:DHaylock,项目名称:fritzing-app,代码行数:50,


示例27: KLF_DEBUG_BLOCK

void KLFDisplayLabel::set_error(bool error_on){  KLF_DEBUG_BLOCK(KLF_FUNC_NAME) ;  setProperty("realTimeLatexError", QVariant(error_on));  QPalette *p;  if (error_on) {    p = &pErrorPalette;  } else {    p = &pDefaultPalette;  }  setAutoFillBackground(true);  setStyleSheet(styleSheet()); // force style sheet refresh  setPalette(*p);}
开发者ID:dmt4,项目名称:klf5,代码行数:14,


示例28: setFocusLook

void SelectableEntry::reverseColors() {	bool focused = m_ui->topLine->isVisible();	setFocusLook(false);	QString originalStyle = styleSheet();	setStyleSheet(originalStyle+"; color: white; background-color: black");	setAutoFillBackground(true);	/* Force a repaint */	repaint();	/* Reset things for the next time */	setStyleSheet(originalStyle);	if(focused) {		setFocusLook(true);	}}
开发者ID:0744,项目名称:Kobo-Reader,代码行数:15,



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


C++ styled函数代码示例
C++ style函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。