Merge branch 'master' of https://gitee.com/290198252/qsswraper
commit
58d67597cc
8
Qss.cpp
8
Qss.cpp
|
@ -92,7 +92,6 @@ QssTtitleBar::QssTtitleBar(QWidget *parent ,
|
||||||
QFile file(":/qss/css/QssTitleBar.css");
|
QFile file(":/qss/css/QssTitleBar.css");
|
||||||
if (!file.open(QIODevice::ReadOnly)){
|
if (!file.open(QIODevice::ReadOnly)){
|
||||||
qDebug()<<"error bar";
|
qDebug()<<"error bar";
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
QTextStream in(&file);
|
QTextStream in(&file);
|
||||||
QString css = in.readAll();
|
QString css = in.readAll();
|
||||||
|
@ -279,7 +278,6 @@ QssMainWindow::QssMainWindow(QWidget *parent/* = 0*/, Qt::WindowFlags flags/* =
|
||||||
QFile file(":/qss/css/QssMainWindow.css");
|
QFile file(":/qss/css/QssMainWindow.css");
|
||||||
if (!file.open(QIODevice::ReadOnly)){
|
if (!file.open(QIODevice::ReadOnly)){
|
||||||
qDebug()<<"error bar";
|
qDebug()<<"error bar";
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
QTextStream in(&file);
|
QTextStream in(&file);
|
||||||
QString css = in.readAll();
|
QString css = in.readAll();
|
||||||
|
@ -415,7 +413,7 @@ int QssMainWindow::CalCursorCol(QPoint pt)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void QssMainWindow::onMouseMoveEvent( QMouseEvent * ev )
|
void QssMainWindow::onMouseMoveEvent(QMouseEvent * ev)
|
||||||
{
|
{
|
||||||
if (m_titleBar->maxOrRestore())
|
if (m_titleBar->maxOrRestore())
|
||||||
{
|
{
|
||||||
|
@ -588,7 +586,7 @@ bool QssMainWindow::eventFilter(QObject * obj, QEvent * ev){
|
||||||
}
|
}
|
||||||
else if (obj == m_titleBar)
|
else if (obj == m_titleBar)
|
||||||
{
|
{
|
||||||
QCoreApplication::sendEvent(this,new QEvent(QEvent::Type::Resize));
|
// QCoreApplication::sendEvent(this,new QEvent(QEvent::Type::Resize));
|
||||||
if (ev->type() == QEvent::Enter)
|
if (ev->type() == QEvent::Enter)
|
||||||
{
|
{
|
||||||
m_left = false;
|
m_left = false;
|
||||||
|
@ -816,7 +814,7 @@ void QssDialog::onMouseMoveEvent( QMouseEvent * ev )
|
||||||
rc.setTop(rc.top() + dy);
|
rc.setTop(rc.top() + dy);
|
||||||
if (m_bottom)
|
if (m_bottom)
|
||||||
rc.setBottom(rc.bottom() + dy);
|
rc.setBottom(rc.bottom() + dy);
|
||||||
|
qDebug()<<"onMouseMoveEvent"<<rc;
|
||||||
m_frame->setGeometry(rc);
|
m_frame->setGeometry(rc);
|
||||||
mFrameRect = rc;
|
mFrameRect = rc;
|
||||||
m_pos = ev->globalPos();
|
m_pos = ev->globalPos();
|
||||||
|
|
Loading…
Reference in New Issue