QDialog ベースの吹き出し付きポップアップ
環境例
| 項目 | 内容 |
|---|---|
| アプリケーション名 | test |
| ライブラリフォルダ | libs |
# git submodule add git@github.com:sharkpp/qtpopover.git libs/qtpopover
# git submodule updateアプリケーションの .pro を変更する。
変更例
+ # You can also select to disable deprecated APIs only up to a certain version of Qt.
+ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
+
+ include(./libs/qtpopover/sources/popover.pri)
+
+ SOURCES += \
+ main.cpp \
+ mainwindow.cpp \./libs/qtpopover/popover.pro を Qt Creator で開きビルドする。
アプリケーションの .pro を変更する。
変更例
+ # You can also select to disable deprecated APIs only up to a certain version of Qt.
+ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
+
+ POPOVER_USE_STATIC_LIB=1
+ include(./libs/qtpopover/sources/popover.pri)
+
+ SOURCES += \
+ main.cpp \
+ mainwindow.cpp \変更例
#include <QApplication>
TaskTrayPopup::TaskTrayPopup(QWidget *parent)
- : QDialog(parent)
+ : Popover(parent)
, ui(new Ui::TaskTrayPopup)
{
ui->setupUi(this);変更例
#ifndef TASKTRAYPOPUP_H
#define TASKTRAYPOPUP_H
+ #include "popover.h"
namespace Ui {
class TaskTrayPopup;
}
class TaskTrayPopup
- : public QDialog
+ : public Popover
{
Q_OBJECT
完了
| 定義 | 概要 |
|---|---|
Popover::Popover(QWidget *parent = 0) |
コンストラクタ |
- 切り欠きの位置(右寄り/☑️中央/左寄り/なし)
- 吹き出しの角丸
- 非アクティブ化処理(まだ一部おかしい)
© 2018 sharkpp
このアプリケーションは MIT ライセンス の下で提供されています。
