예제 #1
0
HospitalisationPay::HospitalisationPay(QWidget *parent)
	: QWidget(parent)
{
	ui.setupUi(this);
	initUI();
	ui.tableWidget->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
	ui.tableWidget->setStyleSheet("QTableWidget{border: 1px solid gray;	background-color: transparent;	selection-color: white;}");
	ui.tableWidget->horizontalHeader()->setStyleSheet("QHeaderView::section {background-color:white;color: black;padding-left: 4px;border: 1px solid #6c6c6c;};"
		"color: white;padding-left: 4px;border: 1px solid #6c6c6c;}"
		"QHeaderView::section:checked{background-color: white;color: black;}");	
	ui.tableWidget->installEventFilter(this);
	/*ui.nameEdit->installEventFilter(this);*/
	Isrefund=false;
	connect(ui.hospitalNocomboBox,SIGNAL(currentIndexChanged(QString)),this,SLOT(getInfo(QString)));
	connect(ui.remarkEdit->document(),SIGNAL(contentsChanged()),this,SLOT(textAreaChanged()));
}
MusicSongSharingWidget::MusicSongSharingWidget(QWidget *parent)
    : MusicAbstractMoveDialog(parent),
      ui(new Ui::MusicSongSharingWidget)
{
    ui->setupUi(this);
    ui->topTitleCloseButton->setIcon(QIcon(":/share/searchclosed"));
    ui->topTitleCloseButton->setStyleSheet(MusicUIObject::MToolButtonStyle03);
    ui->topTitleCloseButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->topTitleCloseButton->setToolTip(tr("Close"));

    ui->qqButton->setChecked(true);
    ui->textEdit->setStyleSheet(MusicUIObject::MTextEditStyle01);

    connect(ui->textEdit, SIGNAL(textChanged()), SLOT(textAreaChanged()));
    connect(ui->topTitleCloseButton, SIGNAL(clicked()), SLOT(close()));
    connect(ui->cancelButton, SIGNAL(clicked()), SLOT(close()));
    connect(ui->shareButton, SIGNAL(clicked()), SLOT(confirmButtonClicked()));
}
예제 #3
0
myTextEdit::myTextEdit(QWidget *parent) :
    QWidget(parent)
{
    editor = new QTextEdit(this);
    connect(editor->document(),SIGNAL(contentsChanged()),this,SLOT(textAreaChanged()));
    editor->setReadOnly(true);
    editor->setFixedWidth(174);
   // editor->setText("a");
    editor->setFixedHeight(50);
    editor->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    editor->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
   // editor->setObjectName("TEXTAREA");
    editor->setStyleSheet(tr("QTextEdit{padding-left:4px;}"));
    editor->setContextMenuPolicy(Qt::NoContextMenu);

    editor->setContextMenuPolicy(Qt::CustomContextMenu);
    connect(editor,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(rightContextMenuSlot(QPoint )));
    this->show();
}