提交 3e9b89cf 编写于 作者: 花狗Fdog's avatar 花狗Fdog

增加了切换歌曲

上级 77c9ae7e
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.5.0, 2020-08-06T11:10:05. -->
<!-- Written by QtCreator 4.5.0, 2020-08-07T21:58:10. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
......
......@@ -147,13 +147,17 @@ compiler_rcc_clean:
-$(DEL_FILE) debug\qrc_lib.cpp
debug\qrc_lib.cpp: lib.qrc \
..\..\QT\5.10.0\msvc2015_64\bin\rcc.exe \
C:\Users\fdog\Desktop\image-20200806113923681.png \
lib\stop.png \
lib\zanting.png \
lib\shangyiqu.png \
lib\timg2.png \
lib\shengyin.png \
lib\xunhuan.png \
lib\shezhi.png \
lib\zuidahua.png \
lib\guanbi.png \
lib\timg.jpg \
lib\xuanxiang.png \
lib\zuixiao.png
D:\QT\5.10.0\msvc2015_64\bin\rcc.exe -name lib lib.qrc -o debug\qrc_lib.cpp
......@@ -295,6 +299,9 @@ debug\moc_mainwindow.cpp: ..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\QMainWin
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\QMediaPlaylist \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\qmediaplaylist.h \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\qmediabindableinterface.h \
thread.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QThread \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qthread.h \
mainwindow.h \
debug\moc_predefs.h \
..\..\QT\5.10.0\msvc2015_64\bin\moc.exe
......@@ -452,6 +459,9 @@ debug\main.obj: main.cpp mainwindow.h \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\QMediaPlaylist \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\qmediaplaylist.h \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\qmediabindableinterface.h \
thread.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QThread \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qthread.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\QApplication \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qapplication.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qcoreapplication.h \
......@@ -589,6 +599,9 @@ debug\mainwindow.obj: mainwindow.cpp mainwindow.h \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\QMediaPlaylist \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\qmediaplaylist.h \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\qmediabindableinterface.h \
thread.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QThread \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qthread.h \
ui_mainwindow.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\QAction \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qaction.h \
......@@ -627,6 +640,12 @@ debug\mainwindow.obj: mainwindow.cpp mainwindow.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qrubberband.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\QLabel \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qlabel.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\QLineEdit \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qlineedit.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextcursor.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextformat.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qpen.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextoption.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\QListWidget \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qlistwidget.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qlistview.h \
......@@ -634,10 +653,6 @@ debug\mainwindow.obj: mainwindow.cpp mainwindow.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qplaintextedit.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qtextedit.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextdocument.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextoption.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextcursor.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextformat.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qpen.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qabstracttextdocumentlayout.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextlayout.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qglyphrun.h \
......@@ -656,7 +671,8 @@ debug\mainwindow.obj: mainwindow.cpp mainwindow.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qdir.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qfileinfo.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qdialog.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QDir
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QDir \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QPoint
debug\qrc_lib.obj: debug\qrc_lib.cpp
......
......@@ -147,13 +147,17 @@ compiler_rcc_clean:
-$(DEL_FILE) release\qrc_lib.cpp
release\qrc_lib.cpp: lib.qrc \
..\..\QT\5.10.0\msvc2015_64\bin\rcc.exe \
C:\Users\fdog\Desktop\image-20200806113923681.png \
lib\stop.png \
lib\zanting.png \
lib\shangyiqu.png \
lib\timg2.png \
lib\shengyin.png \
lib\xunhuan.png \
lib\shezhi.png \
lib\zuidahua.png \
lib\guanbi.png \
lib\timg.jpg \
lib\xuanxiang.png \
lib\zuixiao.png
D:\QT\5.10.0\msvc2015_64\bin\rcc.exe -name lib lib.qrc -o release\qrc_lib.cpp
......@@ -295,6 +299,9 @@ release\moc_mainwindow.cpp: ..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\QMainW
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\QMediaPlaylist \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\qmediaplaylist.h \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\qmediabindableinterface.h \
thread.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QThread \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qthread.h \
mainwindow.h \
release\moc_predefs.h \
..\..\QT\5.10.0\msvc2015_64\bin\moc.exe
......@@ -452,6 +459,9 @@ release\main.obj: main.cpp mainwindow.h \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\QMediaPlaylist \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\qmediaplaylist.h \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\qmediabindableinterface.h \
thread.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QThread \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qthread.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\QApplication \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qapplication.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qcoreapplication.h \
......@@ -589,6 +599,9 @@ release\mainwindow.obj: mainwindow.cpp mainwindow.h \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\QMediaPlaylist \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\qmediaplaylist.h \
..\..\QT\5.10.0\msvc2015_64\include\QtMultimedia\qmediabindableinterface.h \
thread.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QThread \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qthread.h \
ui_mainwindow.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\QAction \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qaction.h \
......@@ -627,6 +640,12 @@ release\mainwindow.obj: mainwindow.cpp mainwindow.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qrubberband.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\QLabel \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qlabel.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\QLineEdit \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qlineedit.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextcursor.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextformat.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qpen.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextoption.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\QListWidget \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qlistwidget.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qlistview.h \
......@@ -634,10 +653,6 @@ release\mainwindow.obj: mainwindow.cpp mainwindow.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qplaintextedit.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qtextedit.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextdocument.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextoption.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextcursor.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextformat.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qpen.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qabstracttextdocumentlayout.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qtextlayout.h \
..\..\QT\5.10.0\msvc2015_64\include\QtGui\qglyphrun.h \
......@@ -656,7 +671,8 @@ release\mainwindow.obj: mainwindow.cpp mainwindow.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qdir.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\qfileinfo.h \
..\..\QT\5.10.0\msvc2015_64\include\QtWidgets\qdialog.h \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QDir
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QDir \
..\..\QT\5.10.0\msvc2015_64\include\QtCore\QPoint
release\qrc_lib.obj: release\qrc_lib.cpp
......
无法预览此类型文件
......@@ -21,8 +21,8 @@ QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_MainWindow_t {
QByteArrayData data[13];
char stringdata0[186];
QByteArrayData data[14];
char stringdata0[230];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
......@@ -42,15 +42,17 @@ QT_MOC_LITERAL(7, 93, 8), // "position"
QT_MOC_LITERAL(8, 102, 17), // "onDurationChanged"
QT_MOC_LITERAL(9, 120, 8), // "duration"
QT_MOC_LITERAL(10, 129, 17), // "onPositionChanged"
QT_MOC_LITERAL(11, 147, 32), // "on_horizontalSlider_valueChanged"
QT_MOC_LITERAL(12, 180, 5) // "value"
QT_MOC_LITERAL(11, 147, 34), // "on_horizontalSlider_sliderRel..."
QT_MOC_LITERAL(12, 182, 23), // "on_pushButton_3_clicked"
QT_MOC_LITERAL(13, 206, 23) // "on_pushButton_1_clicked"
},
"MainWindow\0on_pushButton_clicked\0\0"
"onStateChanged\0QMediaPlayer::State\0"
"state\0onPlaylistChanged\0position\0"
"onDurationChanged\0duration\0onPositionChanged\0"
"on_horizontalSlider_valueChanged\0value"
"on_horizontalSlider_sliderReleased\0"
"on_pushButton_3_clicked\0on_pushButton_1_clicked"
};
#undef QT_MOC_LITERAL
......@@ -60,7 +62,7 @@ static const uint qt_meta_data_MainWindow[] = {
7, // revision
0, // classname
0, 0, // classinfo
6, 14, // methods
8, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
......@@ -68,12 +70,14 @@ static const uint qt_meta_data_MainWindow[] = {
0, // signalCount
// slots: name, argc, parameters, tag, flags
1, 0, 44, 2, 0x08 /* Private */,
3, 1, 45, 2, 0x08 /* Private */,
6, 1, 48, 2, 0x08 /* Private */,
8, 1, 51, 2, 0x08 /* Private */,
10, 1, 54, 2, 0x08 /* Private */,
11, 1, 57, 2, 0x08 /* Private */,
1, 0, 54, 2, 0x08 /* Private */,
3, 1, 55, 2, 0x08 /* Private */,
6, 1, 58, 2, 0x08 /* Private */,
8, 1, 61, 2, 0x08 /* Private */,
10, 1, 64, 2, 0x08 /* Private */,
11, 0, 67, 2, 0x08 /* Private */,
12, 0, 68, 2, 0x08 /* Private */,
13, 0, 69, 2, 0x08 /* Private */,
// slots: parameters
QMetaType::Void,
......@@ -81,7 +85,9 @@ static const uint qt_meta_data_MainWindow[] = {
QMetaType::Void, QMetaType::Int, 7,
QMetaType::Void, QMetaType::LongLong, 9,
QMetaType::Void, QMetaType::LongLong, 7,
QMetaType::Void, QMetaType::Int, 12,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
0 // eod
};
......@@ -97,7 +103,9 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
case 2: _t->onPlaylistChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 3: _t->onDurationChanged((*reinterpret_cast< qint64(*)>(_a[1]))); break;
case 4: _t->onPositionChanged((*reinterpret_cast< qint64(*)>(_a[1]))); break;
case 5: _t->on_horizontalSlider_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 5: _t->on_horizontalSlider_sliderReleased(); break;
case 6: _t->on_pushButton_3_clicked(); break;
case 7: _t->on_pushButton_1_clicked(); break;
default: ;
}
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
......@@ -139,13 +147,13 @@ int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 6)
if (_id < 8)
qt_static_metacall(this, _c, _id, _a);
_id -= 6;
_id -= 8;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 6)
if (_id < 8)
qt_static_metacall(this, _c, _id, _a);
_id -= 6;
_id -= 8;
}
return _id;
}
......
......@@ -10,6 +10,8 @@
#endif
bool m_bIsWindowMoveable = false;
QPoint m_point;
int sum=0;
int sum_=0;
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
......@@ -18,9 +20,8 @@ MainWindow::MainWindow(QWidget *parent) :
this->setWindowFlags(Qt::FramelessWindowHint);//去掉标题栏
player = new QMediaPlayer(this);
playlist = new QMediaPlaylist(this);
playlist->setPlaybackMode(QMediaPlaylist::Loop);
playlist->setPlaybackMode(QMediaPlaylist::Sequential);
player->setPlaylist(playlist);
connect(player,SIGNAL(stateChanged(QMediaPlayer::State)),
this,SLOT(onStateChanged(QMediaPlayer::State)));
connect(player,SIGNAL(positionChanged(qint64)),
......@@ -48,12 +49,7 @@ void MainWindow::mouseMoveEvent(QMouseEvent *event)
{
if (m_bIsWindowMoveable)
{
move(event->pos() - m_point + pos());
// int dx = event->globalX()-m_point.x();
// int dy = event->globalY()-m_point.y();
// m_point = event->globalPos();
// move(x()+dx,y()+dy);
}
}
......@@ -84,7 +80,7 @@ void MainWindow::on_pushButton_clicked()
}
if(player->state()!=QMediaPlayer::PlayingState)
{
playlist->setCurrentIndex(0);
playlist->setCurrentIndex(sum_);
}
player->play();
}
......@@ -120,7 +116,35 @@ void MainWindow::onPositionChanged(qint64 position)
positionTime = QString::asprintf("%d:%d",mins,secs);
ui->label->setText(positionTime+"/"+durationTime);
}
void MainWindow::on_horizontalSlider_valueChanged(int value)
void MainWindow::on_horizontalSlider_sliderReleased()
{
player->setPosition(ui->horizontalSlider->value());
}
void MainWindow::on_pushButton_3_clicked()
{
sum = playlist->mediaCount();//总数
if(sum_ == sum)
{
sum_ =0;
playlist->setCurrentIndex(sum_);
player->play();
return;
}
playlist->setCurrentIndex(++sum_);
player->play();
}
void MainWindow::on_pushButton_1_clicked()
{
player->setPosition(value);
sum = playlist->mediaCount();
if(sum_ == 0)
{
sum_=sum;
playlist->setCurrentIndex(sum_);
player->play();
return;
}
playlist->setCurrentIndex(--sum_);
player->play();
}
......@@ -3,6 +3,7 @@
#include <QMainWindow>
#include<QtMultimedia/QMediaPlayer>
#include<QtMultimedia/QMediaPlaylist>
#include"thread.h"
namespace Ui {
class MainWindow;
}
......@@ -11,6 +12,7 @@ class MainWindow : public QMainWindow
{
Q_OBJECT
private:
Thread * p;
QMediaPlayer * player;
QMediaPlaylist * playlist;
QString durationTime;
......@@ -29,8 +31,11 @@ private slots:
void onPlaylistChanged(int position);
void onDurationChanged(qint64 duration);
void onPositionChanged(qint64 position);
void on_horizontalSlider_sliderReleased();
void on_horizontalSlider_valueChanged(int value);
void on_pushButton_3_clicked();
void on_pushButton_1_clicked();
private:
Ui::MainWindow *ui;
......
......@@ -66,9 +66,21 @@
<height>0</height>
</size>
</property>
<property name="singleStep">
<number>0</number>
</property>
<property name="pageStep">
<number>16</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickInterval">
<number>0</number>
</property>
</widget>
</item>
<item>
......@@ -440,6 +452,28 @@
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit">
<property name="geometry">
<rect>
<x>690</x>
<y>220</y>
<width>221</width>
<height>36</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">font:20px;
background: url(:/C:/Users/fdog/Desktop/image-20200806113923681.png) no-repeat -10px -10px;
border-radius:5px;
border: 1px solid #999999;</string>
</property>
<property name="text">
<string>2506897252</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<zorder>label_3</zorder>
<zorder>frame_3</zorder>
<zorder>frame_4</zorder>
......@@ -448,6 +482,7 @@
<zorder>listWidget</zorder>
<zorder>label_4</zorder>
<zorder>label_5</zorder>
<zorder>lineEdit</zorder>
</widget>
</widget>
<layoutdefault spacing="6" margin="11"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>406</width>
<height>441</height>
</rect>
</property>
<property name="windowTitle">
<string>旭听音乐</string>
</property>
<property name="windowIcon">
<iconset resource="lib.qrc">
<normaloff>:/lib/timg2.png</normaloff>:/lib/timg2.png</iconset>
</property>
<widget class="QWidget" name="centralWidget">
<widget class="QFrame" name="frame_3">
<property name="geometry">
<rect>
<x>6</x>
<y>280</y>
<width>391</width>
<height>151</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>391</width>
<height>151</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<widget class="QFrame" name="frame">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>371</width>
<height>42</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QSlider" name="horizontalSlider">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
<width>153</width>
<height>0</height>
</size>
</property>
<property name="singleStep">
<number>0</number>
</property>
<property name="pageStep">
<number>16</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickInterval">
<number>0</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="minimumSize">
<size>
<width>83</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QFrame" name="frame_2">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>371</width>
<height>91</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_1">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/shangyiqu.png);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/stop.png);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_3">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/shangyiqu.png);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_4">
<property name="minimumSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/xunhuan.png);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>9</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_5">
<property name="minimumSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/shengyin.png);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QFrame" name="frame_4">
<property name="geometry">
<rect>
<x>286</x>
<y>-6</y>
<width>131</width>
<height>31</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QToolButton" name="toolButton_1">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/xuanxiang.png);</string>
</property>
<property name="text">
<string/>
</property>
<property name="popupMode">
<enum>QToolButton::DelayedPopup</enum>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonIconOnly</enum>
</property>
<property name="autoRaise">
<bool>false</bool>
</property>
<property name="arrowType">
<enum>Qt::NoArrow</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButton_2">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/zuixiao.png);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButton_3">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/zuidahua.png);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButton_4">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/guanbi.png);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPlainTextEdit" name="plainTextEdit">
<property name="geometry">
<rect>
<x>11</x>
<y>60</y>
<width>381</width>
<height>71</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>0</x>
<y>30</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>添加音频</string>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>421</width>
<height>28</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(170, 85, 255,100);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QListWidget" name="listWidget">
<property name="geometry">
<rect>
<x>11</x>
<y>160</y>
<width>381</width>
<height>61</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>2</x>
<y>-1</y>
<width>36</width>
<height>31</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/timg2.png);</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>39</x>
<y>4</y>
<width>61</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>旭听音乐</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit">
<property name="geometry">
<rect>
<x>690</x>
<y>220</y>
<width>221</width>
<height>36</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">font:20px;
background: url(:/C:/Users/fdog/Desktop/image-20200806113923681.png) no-repeat -10px -10px;
border-radius:5px;
border: 1px solid #999999;</string>
</property>
<property name="text">
<string>2506897252</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<zorder>label_3</zorder>
<zorder>frame_3</zorder>
<zorder>frame_4</zorder>
<zorder>plainTextEdit</zorder>
<zorder>pushButton</zorder>
<zorder>listWidget</zorder>
<zorder>label_4</zorder>
<zorder>label_5</zorder>
<zorder>lineEdit</zorder>
</widget>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>
<include location="lib.qrc"/>
</resources>
<connections>
<connection>
<sender>toolButton_4</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>392</x>
<y>13</y>
</hint>
<hint type="destinationlabel">
<x>206</x>
<y>217</y>
</hint>
</hints>
</connection>
</connections>
</ui>
......@@ -17,6 +17,7 @@
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QListWidget>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QPlainTextEdit>
......@@ -61,6 +62,7 @@ public:
QListWidget *listWidget;
QLabel *label_4;
QLabel *label_5;
QLineEdit *lineEdit;
void setupUi(QMainWindow *MainWindow)
{
......@@ -91,7 +93,11 @@ public:
horizontalSlider->setObjectName(QStringLiteral("horizontalSlider"));
horizontalSlider->setEnabled(true);
horizontalSlider->setMinimumSize(QSize(153, 0));
horizontalSlider->setSingleStep(0);
horizontalSlider->setPageStep(16);
horizontalSlider->setValue(0);
horizontalSlider->setOrientation(Qt::Horizontal);
horizontalSlider->setTickInterval(0);
horizontalLayout->addWidget(horizontalSlider);
......@@ -230,6 +236,14 @@ public:
label_5->setObjectName(QStringLiteral("label_5"));
label_5->setGeometry(QRect(39, 4, 61, 21));
label_5->setAlignment(Qt::AlignCenter);
lineEdit = new QLineEdit(centralWidget);
lineEdit->setObjectName(QStringLiteral("lineEdit"));
lineEdit->setGeometry(QRect(690, 220, 221, 36));
lineEdit->setStyleSheet(QLatin1String("font:20px;\n"
"background: url(:/C:/Users/fdog/Desktop/image-20200806113923681.png) no-repeat -10px -10px;\n"
"border-radius:5px;\n"
"border: 1px solid #999999;"));
lineEdit->setAlignment(Qt::AlignCenter);
MainWindow->setCentralWidget(centralWidget);
label_3->raise();
frame_3->raise();
......@@ -239,6 +253,7 @@ public:
listWidget->raise();
label_4->raise();
label_5->raise();
lineEdit->raise();
retranslateUi(MainWindow);
QObject::connect(toolButton_4, SIGNAL(clicked()), MainWindow, SLOT(close()));
......@@ -263,6 +278,7 @@ public:
label_3->setText(QString());
label_4->setText(QString());
label_5->setText(QApplication::translate("MainWindow", "\346\227\255\345\220\254\351\237\263\344\271\220", nullptr));
lineEdit->setText(QApplication::translate("MainWindow", "2506897252", nullptr));
} // retranslateUi
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册