重新改进支持Qt4.6-Qt6.1
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2019-02-16T15:08:47
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
|
||||
android {QT += androidextras}
|
||||
|
||||
TARGET = ffmpegdemo
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma execution_character_set("utf-8")
|
||||
#include "widget.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QTextCodec>
|
||||
#include <QDesktopWidget>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -35,12 +33,5 @@ int main(int argc, char *argv[])
|
||||
w.setWindowTitle("视频流播放ffmpeg内核 (QQ: 517216493)");
|
||||
w.show();
|
||||
|
||||
//居中显示窗体
|
||||
QDesktopWidget deskWidget;
|
||||
int deskWidth = deskWidget.availableGeometry().width();
|
||||
int deskHeight = deskWidget.availableGeometry().height();
|
||||
QPoint movePoint(deskWidth / 2 - w.width() / 2, deskHeight / 2 - w.height() / 2);
|
||||
w.move(movePoint);
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user