Skip to content
  • 0 Votes
    10 Posts
    1k Views
    T
    @GrecKo Dear GrecKo, in the qml_singleton.h should I change the word "Type" to "System", because my Particlesystem is called like that? Where have I to introduce my Hardcore_Entrymodel - is it the UnsafeArea or is it the ApplicationUI class? I tend to UnsafeArea=Hardcore_Entrymodel and to leave the names "ApplicationUI" and "Type##QmlSingleton", but I'm not sure ...
  • 0 Votes
    3 Posts
    802 Views
    BDC_PatrickB
    @JonB Thanks.. found out, that i needed to create a new Pointer in the Declaration of the .h File.. Means.. TGS_Widget_AssetList * _assetList; Wasn´t enough... I needed to do: TGS_Widget_AssetList *_assetList = new TGS_Widget_AssetList(this); or auto *_assetList = new TGS_Widget_AssetList(this); Now it works.. i will update my initial post here
  • 0 Votes
    10 Posts
    2k Views
    Christian EhrlicherC
    Correct.
  • Segmentation Fault on object Creation

    Unsolved C++ Gurus constructor
    3
    0 Votes
    3 Posts
    808 Views
    JonBJ
    @Vinoth-Rajendran4 Further to @Christian-Ehrlicher, in other words that means you need to delete the statement Hello* obj = new Hello;! Your calling code will go new Hello, and that will execute your constructor and return the created instance, you don't want another new Hello anywhere inside your Hello class as it stands.
  • 0 Votes
    6 Posts
    3k Views
    mrjjM
    Hi If you changed to Dialog::Dialog(QStringList listToLoad, QWidget *parent = 0) ; Make sure to change it both in .h file and .cpp file so they match.
  • 0 Votes
    12 Posts
    27k Views
    DongD
    Dear All: here is my situation The class which cause compile Error is PropertyColumnMapping in DynamicObjectCore.pro Then CommonBusiness.pro using this class And Presentation linked to both CommonBusiness.pro & DynamicObjectCore.pro Clean + QMake + Rebuild doesn't work. Here is my Project Structure. Application.pro TEMPLATE = subdirs CONFIG += ordered SUBDIRS += Framework Services Business Presentation Updater QT += qml quick widgets network sql xml Business.pro TEMPLATE = subdirs SUBDIRS += CommonBusiness ServiceBusiness //Link to Framework.System CommonBusiness.pro QT -= gui QT += qml quick sql xml xmlpatterns network TARGET = CommonBusiness TEMPLATE = lib CONFIG += staticlib c++11 SOURCES += commonbusiness.cpp ... HEADERS += commonbusiness.h ... //# Link to FrameWork.DynamicObjectCore DynamicObjectCore.pro QT -= gui QT += qml TARGET = DynamicObjectCore TEMPLATE = lib CONFIG += staticlib c++11 #DEFINES += DYNAMICOBJECTCORE_LIBRARY SOURCES += MetadataModel/propertycolumnmapping.cpp ... HEADERS += MetadataModel/propertycolumnmapping.h ... unix { target.path = /usr/lib INSTALLS += target } Presentation.pro TEMPLATE = app TARGET = [ApplicationName] QT += qml quick widgets network sql xml xmlpatterns //# for QT 5.4 qtHaveModule(webengine) { QT += webengine DEFINES += QT_WEBVIEW_WEBENGINE_BACKEND } qtHaveModule(webkitwidgets) { QT += webkitwidgets } //# for QT 5.7 equals(QT_VERSION, QT_VERSION_CHECK(5, 7, 0)) { QT += webview DEFINES += QT_WEBVIEW_CONTROL_BACKEND } CONFIG += c++11 CONFIG(release, debug|release) { CONFIG += release force_debug_info } RESOURCES += qml.qrc shared.qrc //# Link to DynamicObjectCore //# Link to CommonBusiness
  • 0 Votes
    2 Posts
    8k Views
    SGaistS
    Hi, QObject is a non copyable type. See here for more information.
  • Trouble with QStackedWidget

    Solved General and Desktop qstackedwidget constructor
    2
    0 Votes
    2 Posts
    1k Views
    SGaistS
    Hi, Since you marked it solved, can you share what you did to fix your code ?
  • 0 Votes
    4 Posts
    7k Views
    kshegunovK
    @alogim Hello, Unfortunately, no. To make use of the parent-child mechanism your object must derive from QObject at least. Search through the forum for "QObject" and "RAII", Here is a thread where I've put some effort in explaining the QObject ownership. Back to your question: class Object : public QObject { public: Object(QWidget * parent = 0) : QObject(parent) { } }; Will do what you want, i.e. delete the Object when the parent is destroyed. Then you indeed create your object like this: Object * obj = new Object(this); and it's sufficient to ensure proper cleanup. Kind regards.
  • QGraphicsView hidden constructors

    Solved General and Desktop qgraphicsview constructor
    3
    0 Votes
    3 Posts
    1k Views
    A
    @Wieland Thank you, I guessed the first was some kind of copy constructor. As concerns the second, it was just a curiosity of mine. Thank you :)
  • 0 Votes
    8 Posts
    3k Views
    Z
    I solved my problem with not calling parseFunction in its own class constructor but with signals and slots in mainwindow.cpp file: connect(xml, SIGNAL(started()), first, SLOT(parseFunction()));