add convenience method YACReader::addSeparator(QWidget *) for adding QAction separator to a widget

This commit is contained in:
Luis Ángel San Martín
2014-06-22 09:22:27 +02:00
parent 616d109c09
commit 21d83b31e1
5 changed files with 33 additions and 53 deletions

View File

@ -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);
}

View File

@ -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