上一页 1 ··· 7 8 9 10 11 12 13 下一页
摘要: /***********************/ //画弧线#if 0 QPainter painter(this);//创建对象 int w = this->width(); int h = this->height(); QRect rect(w/4,h/4,w/2,h/2); int sta 阅读全文
posted @ 2021-07-20 17:01 Azuki_op 阅读(504) 评论(0) 推荐(0)
摘要: Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) { ui->setupUi(this); setPalette(QPalette(Qt::white)); //设置QPalette对象的背景属性(颜色或者图片 阅读全文
posted @ 2021-07-20 11:54 Azuki_op 阅读(221) 评论(0) 推荐(0)
摘要: Q_DECL_OVERRIDE也就是c++的override # define Q_DECL_OVERRIDE override 在重写虚函数时会用到, 作用是防止写错虚函数: // generate error if this doesn't actually override anything: 阅读全文
posted @ 2021-07-20 11:07 Azuki_op 阅读(147) 评论(0) 推荐(0)
摘要: ui->statusBar->showMessage("hello",5000);//显示临时信息 QLabel *lab = new QLabel(this); lab->setText("xxxxxxxxx"); //lab->setStyleSheet("样式表"); ui->statusBa 阅读全文
posted @ 2021-07-20 00:15 Azuki_op 阅读(431) 评论(0) 推荐(0)
摘要: QMap<QString ,int>map; map.insert("aa",1); map.insert("bb",2); //遍历map QMap<QString,int>::iterator it; for(it==map.begin();it!= map.end();it++) { qDeb 阅读全文
posted @ 2021-07-19 23:50 Azuki_op 阅读(3303) 评论(0) 推荐(0)
摘要: QList<int>numlist; numlist.push_back(1); numlist.push_back(20); numlist.push_front(21); numlist.prepend(2); numlist.append(11); // qSort(numlist.begin 阅读全文
posted @ 2021-07-19 23:30 Azuki_op 阅读(232) 评论(0) 推荐(0)
摘要: #ifndef DIALOG_H #define DIALOG_H #include <QDialog> #include <QPoint> namespace Ui { class Dialog; } class Dialog : public QDialog { Q_OBJECT public: 阅读全文
posted @ 2021-07-19 16:52 Azuki_op 阅读(86) 评论(0) 推荐(0)
摘要: QString Dialog::encrypt(const QString &str) { QByteArray btArray; btArray.append(str); QCryptographicHash hash(QCryptographicHash::Md5); //MD5 加密算法 ha 阅读全文
posted @ 2021-07-19 16:22 Azuki_op 阅读(302) 评论(0) 推荐(0)
摘要: QString QString::trimmed() const 返回值为去除了开头和结尾的空白字符串,这里的空白指QChar::isSpace()返回值为true,比如'\t','\n','\v','\f','\r'和' '; QString str = " lots\t of\nwhitespa 阅读全文
posted @ 2021-07-19 14:59 Azuki_op 阅读(437) 评论(0) 推荐(0)
摘要: 这两个函数作用分别是:都能够隐藏QDialog,但是返回值不同,一个是Accepted,一个是Rejected, 返回值不同的作用是:区分用户按下的OK按钮,还是Cancel按钮。 if(my1.exec()==QDialog::Accepted) my1是一个对话框,当调用exec方法时,弹出,等 阅读全文
posted @ 2021-07-19 14:52 Azuki_op 阅读(1957) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 下一页