remove DsComboBox

This commit is contained in:
dreamsourcelabTAI 2024-01-05 15:12:49 +08:00
parent a305223d94
commit 326b25e1dd
3 changed files with 26 additions and 10 deletions

View File

@ -222,8 +222,8 @@ void MainFrame::showMaximized()
if (sk >= 1.5)
{
auto rect = QGuiApplication::primaryScreen()->availableGeometry();
this->move(rect.left(), rect.top());
this->resize(rect.width(), rect.height());
// this->move(rect.left(), rect.top());
//this->resize(rect.width(), rect.height());
}
#endif
@ -292,13 +292,13 @@ bool MainFrame::eventFilter(QObject *object, QEvent *event)
if (type == QEvent::MouseMove) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
int x0 = (int)mouse_event->globalPosition().x();
int y0 = (int)mouse_event->globalPosition().y();
#else
int x0 = mouse_event->globalX();
int y0 = mouse_event->globalY();
#endif
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
int x0 = (int)mouse_event->globalPosition().x();
int y0 = (int)mouse_event->globalPosition().y();
#else
int x0 = mouse_event->globalX();
int y0 = mouse_event->globalY();
#endif
if(mouse_event->buttons().testFlag(Qt::LeftButton)) {
if (!_freezing) {

View File

@ -20,6 +20,14 @@
*/
#include "dscombobox.h"
DsComboBox::DsComboBox(QWidget *parent)
: QComboBox(parent)
{
}
/*
#include "dscombobox.h"
#include <QFontMetrics>
#include <QString>
@ -92,3 +100,4 @@ DsComboBox::DsComboBox(QWidget *parent) : QComboBox(parent)
_bPopup = false;
}
*/

View File

@ -25,6 +25,13 @@
#include <QComboBox>
#include <QKeyEvent>
class DsComboBox : public QComboBox
{
public:
explicit DsComboBox(QWidget *parent = nullptr);
};
/*
class DsComboBox : public QComboBox
{
Q_OBJECT
@ -47,7 +54,7 @@ private:
int _contentWidth;
bool _bPopup;
};
*/
#endif // DSCOMBOBOX_H