mirror of
https://github.com/YACReader/yacreader
synced 2025-07-27 01:15:07 -04:00
add convenience method YACReader::addSeparator(QWidget *) for adding QAction separator to a widget
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include "yacreader_global.h"
|
||||
#include <QAction>
|
||||
|
||||
using namespace YACReader;
|
||||
|
||||
@ -11,3 +12,10 @@ QString YACReader::getSettingsPath()
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void YACReader::addSperator(QWidget *w)
|
||||
{
|
||||
QAction * separator = new QAction(w);
|
||||
separator->setSeparator(true);
|
||||
w->addAction(separator);
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <QDesktopServices>
|
||||
#endif
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#define VERSION "7.1.0"
|
||||
|
||||
@ -94,8 +95,7 @@ namespace YACReader
|
||||
};
|
||||
|
||||
QString getSettingsPath();
|
||||
|
||||
void addSperator(QWidget * w);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user