mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +08:00
Added Q_INIT_RESOURCE(ads) for static builds
This commit is contained in:
parent
8bf8309949
commit
85626c9a21
@ -566,10 +566,6 @@ CMainWindow::CMainWindow(QWidget *parent) :
|
||||
// Now create the dock manager and its content
|
||||
d->DockManager = new CDockManager(this);
|
||||
|
||||
// uncomment the following line to have the old style where the dock
|
||||
// area close button closes the active tab
|
||||
// CDockManager::setConfigFlags({CDockManager::DockAreaHasCloseButton
|
||||
// | CDockManager::DockAreaCloseButtonClosesTab});
|
||||
connect(d->PerspectiveComboBox, SIGNAL(activated(const QString&)),
|
||||
d->DockManager, SLOT(openPerspective(const QString&)));
|
||||
|
||||
|
@ -55,6 +55,20 @@
|
||||
#include "DockingStateReader.h"
|
||||
|
||||
|
||||
/**
|
||||
* Initializes the resources specified by the .qrc file with the specified base
|
||||
* name. Normally, when resources are built as part of the application, the
|
||||
* resources are loaded automatically at startup. The Q_INIT_RESOURCE() macro
|
||||
* is necessary on some platforms for resources stored in a static library.
|
||||
* Because GCC caues a linker error if we put Q_INIT_RESOURCE into the
|
||||
* loadStyleSheet() function, we place it into a function outside of the ads
|
||||
* namespace
|
||||
*/
|
||||
static void initResource()
|
||||
{
|
||||
Q_INIT_RESOURCE(ads);
|
||||
}
|
||||
|
||||
|
||||
namespace ads
|
||||
{
|
||||
@ -148,6 +162,7 @@ DockManagerPrivate::DockManagerPrivate(CDockManager* _public) :
|
||||
//============================================================================
|
||||
void DockManagerPrivate::loadStylesheet()
|
||||
{
|
||||
initResource();
|
||||
QString Result;
|
||||
#ifdef Q_OS_LINUX
|
||||
QFile StyleSheetFile(":ads/stylesheets/default_linux.css");
|
||||
|
Loading…
Reference in New Issue
Block a user