QML failing to detect QObject destroyed in C++ - c++

The presented code does the following:
<1> Create object of QObject derived class and expose it to QML
<2> The class has a pointer to another QObject derived class and the pointer is accessible to QML via Q_PROPERTY.
<3> MouseArea in QML detects user-click and simply asks the c++ code for the pointer to be deleted.
<4> Color of rectangle turns black once this is detected.
The problem is that while certain approaches detect the deletion of the pointer by c++ other approaches don't.
Look at the inline comments:
Combination of (1) and (1b) works
Combination of (1) and (1d) does not work
(2) alone by itself works but (3) alone by itself does not.
When things work you should see the color of the Rectangle turn to black from yellow.
Can someone please explain this behaviour?
CPP codes:
class Name : public QObject
{
Q_OBJECT
Q_PROPERTY(bool boolVal READ boolVal CONSTANT FINAL)
public:
bool boolVal() const {return true;}
};
class Root : public QObject
{
Q_OBJECT
Q_PROPERTY(QObject* name READ name CONSTANT FINAL)
public:
QObject* name() const {return m_pName;}
Q_INVOKABLE void deleteName() {delete m_pName; m_pName = 0;}
private:
Name *m_pName {new Name};
};
//--- main
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
Root objRoot;
QtQuick2ApplicationViewer viewer0;
viewer0.rootContext()->setContextProperty("objRoot", &objRoot);
viewer0.setMainQmlFile(QStringLiteral("qml/dualWindowApp/main.qml"));
viewer0.showExpanded();
return app.exec();
}
QML Code:
import QtQuick 2.0
Rectangle {
width: 360
height: 360
color: "red"
Rectangle {
id: objRect
anchors {left: parent.left; top: parent.top}
height: 70; width: 70;
property bool checked
property QtObject temp: objRoot.name
color: checked ? "yellow" : "black" // (1)
//color: objRect.temp && objRect.temp.boolVal ? "yellow" : "black" //--->WORKS (2)
//color: objRoot.name && objRoot.name.boolVal ? "yellow" : "black" //--->DOES NOT WORK !!! (3)
Binding on checked {
//value: objRect.temp && objRect.temp.boolVal //--->DOES NOT WORK !!! (1a)
//value: objRect.temp !== null && objRect.temp.boolVal //--->WORKS (1b)
value: objRect.temp ? objRect.temp.boolVal : false //--->WORKS (1c)
//Using directly without collecting in local QtQobject temp:
//----------------------------------------------------------
//value: objRoot.name && objRoot.name.boolVal //--->DOES NOT WORK !!! (1d)
//value: objRoot.name !== null && objRoot.name.boolVal //--->DOES NOT WORK !!! (1e)
//value: objRoot.name ? objRoot.name.boolVal : false //--->DOES NOT WORK !!! (1f)
}
Text {
text: "Destroy"
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onClicked: objRoot.deleteName()
}
}
}
using: {Qt/QML 5.2.0, Win 7, MinGW 4.8, QtQuick 2.0}

Your property declaration looks strange to me: name can obviously change, but you've declared it CONSTANT. My guess is it it'd work a whole lot better without the CONSTANT, and instead provide a NOTIFY of a nameChanged signal emitted when the value of name changes, else there's no guarantee the QML states bound to the C++ properties will be updated.

Related

Qt QML Singleton Intellisense

Qt QML, they do work, but no intellisense in QML references. Can I achieve intellisense?
pragma Singleton
import QtQuick 2.0
import QtQuick.Window 2.3
Item {
property int iMode: 0
property bool bSwapLeftRight: false
Registering it:
qmlRegisterSingletonType(QUrl(QLatin1String("qrc:/GlobalSettings.qml")), "ncs.global", 1, 0, "SingletonSettings" );
Second example;:
ctxt->setContextProperty("someModel", QVariant::fromValue(ownModel));
ctxt->setContextProperty("globalControl", QVariant::fromValue(globalControl.Get()));
First one i achieve IntelliSense in QML whilst using, the second one is the singleton, I do not achieve IntelliSense. Planning to expose some c++ defined enums to QML through this one, but looses value when no IntelliSense is provided..
Question is basically, do Qt Quick and Creator support IntelliSense for singleton classes ? Worthwhile investigating further?
Adding some more details, main question is NOT about enum's, but IntelliSense (auto-complete):
A few snippets:
main.cpp:
//Regular Pointer
SomeModel* ownModel = new SomeModel();
//Custom Singleton implementation
GlobalControlSP globalControl = GlobalControl::GetInstance();
//I did not really want this line. GlobalControl should be singleton, how would this be threated?
qmlRegisterType<GlobalControl>("ncs.global", 1, 0, "Global");
//Registering a "Pragma Singleton" file, Intellisense do not work
qmlRegisterSingletonType(QUrl(QLatin1String("qrc:/GlobalSettings.qml")), "ncs.global", 1, 0, "SingletonSettings" );
QQmlApplicationEngine engine;
QQmlContext* ctxt = engine.rootContext();
//Regular context property, not singleton. Intellisense works
ctxt->setContextProperty("ownModel", QVariant::fromValue(ownModel));
//Registering the singleton as context property, Intellisense do not work
ctxt->setContextProperty("globalControl", QVariant::fromValue(globalControl.Get()));
engine.load(QUrl(QLatin1String("qrc:/main.qml")));
globalcontrol.h:
class GlobalControl : public QObject,
{
Q_OBJECT
Q_PROPERTY(QString backcolor READ backcolor NOTIFY backcolorChanged)
....
public:
GlobalControl(QObject *parent = nullptr);
QString backcolor() const { return m_backColor; }
....
enum EnButton
{
DEVICE_START,
DEVICE_IR,
.....
};
Q_ENUM(EnButton)
public slots:
void changeMode(int mode);
void buttonPressed(int button);
some qml file:
//This implementation works:
NcsButton {
property int valuent
id:ir
text: qsTr("IR")
width: 66 * widthScaling
Layout.row: 4
Layout.column: 1
fontColor: bIr ? valueColor : textColor
onClicked: {
globalControl.buttonPressed(Global.DEVICE_IR)
//This does not work:
NcsButton {
id:ir
text: qsTr("IR")
width: 66 * widthScaling
Layout.row: 4
Layout.column: 1
fontColor: bIr ? valueColor : textColor
onClicked: {
globalControl.buttonPressed(globalControl.DEVICE_IR)
Solution or workaround:
For QML defined singleton, add to Qt compiler QML library a generated file
..\..\..\bin\qmlplugindump -relocatable ncs.global 1.0 > plugins.qmltypes
For c++ registered singleton, make a "fake" pointer of normal class type. Register. To retrieve the enum from same singleton class, create a UncreatableType:
GlobalControlSP globalControlOrig = GlobalControl::GetInstance();
GlobalControl* globalControl = globalControlOrig.Get();
ctxt->setContextProperty("globalControl", QVariant::fromValue(globalControl));
qmlRegisterUncreatableType<GlobalControl>("ncs.global", 1, 0, "Global", "Singleton");

DoubleValidator is not checking the ranges properly

Let me use an example to explain the issue.
If we have a TextField like this,
TextField {
text: "0.0"
validator: DoubleValidator { bottom: -359.9;
top: 359.9;
decimals: 1;
notation: DoubleValidator.StandardNotation }
onEditingFinished: {
console.log("I'm here!");
}
}
We can type numbers such as 444.9, 399.9 or -555.5. As you can see, the values are not between -359.9 and 359.9.
In the documentation we can find the following information:
Input is accepted but invalid if it contains a double that is
outside the range or is in the wrong format; e.g. with too many digits
after the decimal point or is empty.
I thought DoubleValidator didn't accept this kind of things, but unfortunately it does.
So I suppose the solution would be to check the final input, but again we have a problem: editingFinished is only emitted if the validator returns an acceptable state and this is not always the case.
Perhaps I'm not doing a good approach, I'm not understanding how to use DoubleValidator or maybe I need some code in C++.
By the way, I'm working with Qt 5.4.
The problem lies in the fact that QML TextField accepts intermediate input:
validator : Validator
Allows you to set a validator on the TextField. When a validator is set, the TextField will only accept input which leaves the text property in an intermediate state. The accepted signal will only be sent if the text is in an acceptable state when enter is pressed.
The validate()-function of QDoubleValidator describes when it returns QValidator::Intermediate:
State QValidator::validate(QString & input, int & pos) const
This virtual function returns Invalid if input is invalid according to this validator's rules, Intermediate if it is likely that a little more editing will make the input acceptable (e.g. the user types "4" into a widget which accepts integers between 10 and 99), and Acceptable if the input is valid.
So that means, the validator returns QValidator::Intermediate, as long as a double value is entered and because TextField is okay with "intermediate", you can type anything as long as it is a number.
What you can do is to subclass QDoubleValidator and to override validate(), so that it does not return Intermediate when the values are out of bounds:
class TextFieldDoubleValidator : public QDoubleValidator {
public:
TextFieldDoubleValidator (QObject * parent = 0) : QDoubleValidator(parent) {}
TextFieldDoubleValidator (double bottom, double top, int decimals, QObject * parent) :
QDoubleValidator(bottom, top, decimals, parent) {}
QValidator::State validate(QString & s, int & pos) const {
if (s.isEmpty() || (s.startsWith("-") && s.length() == 1)) {
// allow empty field or standalone minus sign
return QValidator::Intermediate;
}
// check length of decimal places
QChar point = locale().decimalPoint();
if(s.indexOf(point) != -1) {
int lengthDecimals = s.length() - s.indexOf(point) - 1;
if (lengthDecimals > decimals()) {
return QValidator::Invalid;
}
}
// check range of value
bool isNumber;
double value = locale().toDouble(s, &isNumber);
if (isNumber && bottom() <= value && value <= top()) {
return QValidator::Acceptable;
}
return QValidator::Invalid;
}
};
I found an easier way.
TextField {
id: control
onTextChanged:
{
if(!acceptableInput)
control.undo()
}
}
When text in TextField is invalid, acceptableInput would change to false, so when text changed ,check the property, if it's false, then call undo() to undo the changes.
The answer provided by #xsquared was perfect. I think it's a good idea to share with anyone curious how to integrate the solution with QML.
TextFieldDoubleValidator is the class which #xsquared suggested.
So the first thing is to register the new type in our main.
main.cpp
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QtQml>
#include "textfielddoublevalidator.h"
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
qmlRegisterType<TextFieldDoubleValidator>("TextFieldDoubleValidator", 1,0,
"TextFieldDoubleValidator");
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
return app.exec();
}
After that, we can use the new type in our QML application:
main.qml
import QtQuick 2.5
import QtQuick.Window 2.2
import QtQuick.Controls 1.4
import TextFieldDoubleValidator 1.0
Window {
visible: true
// DoubleValidator doesn't clear the TextField when
// text > 359.9 or < -359.9
TextField {
text: "0.0"
validator: DoubleValidator {
bottom: -359.9;
top: 359.9;
decimals: 1;
notation: DoubleValidator.StandardNotation
}
}
// Solution: use your own DoubleValidator.
// This works OK and text is cleared out when
// text > 359.9 or < -359.9
TextField {
y: 50
text: "0.0"
validator: TextFieldDoubleValidator {
bottom: -359.9;
top: 359.9;
decimals: 1;
notation: DoubleValidator.StandardNotation
}
}
}
Here is a pure qml version:
TextFieldInput{
validator: DoubleValidator
{
bottom: minimumValue
top: maximumValue
}
property real maximumValue: constants._MAXIMUM_INTEGER
property real minimumValue: constants._MINIMUM_INTEGER
property string previousText: ""
onTextChanged:
{
var numericValue = getValue()
if (numericValue > maximumValue || numericValue < minimumValue)
{
text = previousText
}
previousText = text
}
function setValue(_value)
{
text = String(_value)
}
function getValue()
{
return Number(text)
}}

Qml QColor Type Error

I am trying to set a QColor property of a custom QQuickPaintedItem by passing a QColor from C++ to QML. I have tried the following:
Converting QColor to QVariant. In the JS debugger, the color object was empty.
Converting QColor to a color string "#RRGGBB". This still throws the type error.
QML Code:
m_DisplayScreens[m_DisplayScreens.length].backgroundColor = m_Model.getBackgroundColor(i_Timer);
m_DisplayScreens is a list of my custom QML widget. I can set the backgroundColor property just fine by doing something like.
DisplayScreen
{
backgroundColor: "Red"
}
The "m_Model" object is simply a QObject which is the 'backend' of the QML form. The code for getBackgroundColor is as follows:
Q_INVOKABLE QString getBackgroundColor(int index);
QString CountDownPanelModel::getSegmentColor(int index)
{
return "#003300";
}
The specific error is: xxx.js:19: TypeError: Type error
Any help would be appreciated. I've been banging my head against this for a few hours now.
Thanks,
Jec
1st Edit:
Ok folks, here is my attempt when returning a QColor;
class CountDownPanelModel : public QObject
{
Q_OBJECT
public:
explicit CountDownPanelModel(QObject *parent = 0);
~CountDownPanelModel() = default;
Q_INVOKABLE QColor getBackgroundColor(int index);
Q_INVOKABLE QColor getSegmentColor(int index);
};
QColor CountDownPanelModel::getBackgroundColor(int index)
{
return QColor(44, 44, 44);
//return m_TimerList->at(index)->getTimerData()->getBackgroundColor();
}
QColor CountDownPanelModel::getSegmentColor(int index)
{
return QColor(200, 200, 200);
//return m_TimerList->at(index)->getTimerData()->getSegmentColor();
}
The result of using a QColor is the same as using the QString. I get "Type Error" at the line I assign the color at. For example:
var m_DisplayScreens = [];
function createDisplays()
{
m_DisplayScreens = [];
var timerCount = m_Model.getTimerCount();
var bg = m_Model.getBackgroundColor(0);
var fg = m_Model.getSegmentColor(0)
for (var i_Timer = 0;
i_Timer < timerCount;
++i_Timer)
{
var component = Qt.createComponent("DynamicSevenSegmentDisplay.qml");
var display = component.createObject(m_Panel);
display.initialize(m_Model.getSevenSegmentDisplayInitializer())
display.y = 100 * (i_Timer);
m_DisplayScreens[m_DisplayScreens.length] = display;
m_DisplayScreens[m_DisplayScreens.length].backgroundColor = m_Model.getBackgroundColor(i_Timer);
m_DisplayScreens[m_DisplayScreens.length].segmentColor = m_Model.getSegmentColor(i_Timer)
}
m_Panel.height = 100 * timerCount;
}
Just for completeness, here is DynamicSevenSegmentDisplay.qml
SevenSegmentDisplayScreen
{
y: 0
height: 100
width: parent.width - x
backgroundColor: "Black"
borderPercentage: 10
displayCount: 20
text: "1234567890"
anchors.left: m_SettingsButton.right
anchors.leftMargin: 8
}
I'm completely confused as to why I can't assignthe QColor to backgroundColor. The debugger just shows nothing in the 'value' column. I take it this is the JS version of 'null'.
This is not a definitive answer but I found several issues. I was previously developing using Linux Mint. I recently switched to Ubuntu and found several issues with passing data between C++ and QML. I got a message about a CRC miss match.
"the debug information found in "/usr/lib/x86_64-linux-gnu/dri/i915_dri.so" does not match "/usr/lib/x86_64-linux-gnu/dri/i965_dri.so" (CRC mismatch)."
So this also could be part of the problem. But for the most part it looks like its my development machine.

Show, change data and keep QQmlListProperty in qml

in the past i resolved a problem with QQmlListProperty for expose c++ qlist to qml, and the problem was resolved, now i try use their solution again, but i can't.
the first time the list exposed to qml every time are different, this time no, i have a Qlist in a main class, and many data from her are loaded from db, and others changed in runtime.
When the application start, the load of data and exposed to Qml is ok, i need change of page(gui) and keep the data stored in program and probably used many of their data in other guis (as text), and every time i change of page (with loader element) the program crashes, i believe a directions of pointers are changed in qml when the data from c++ class is copied to gui in qml.
My Code from QmlListproperty class and method of Load data in qml, and copy from the main qml to page.
definition of class ListBombsUi.h"
#include "StructBombUi.h"
class ListBombsUi: public QObject{
Q_OBJECT
Q_PROPERTY(QQmlListProperty<CStructBombUi> bombsUi READ bombsUiList NOTIFY bombsUiChanged);
Q_CLASSINFO("DefaultProperty", "bombsUi");
public:
ListBombsUi(QObject *parent=0);
QQmlListProperty<CStructBombUi> bombsUiList();
static void appendBombUi(QQmlListProperty<CStructBombUi> *list, CStructBombUi *pdt);
static void clear(QQmlListProperty<CStructBombUi> *property);
static int listSize(QQmlListProperty<CStructBombUi> *property);
static CStructBombUi *bombUiAt(QQmlListProperty<CStructBombUi> *property, int index);
void addBomb(CStructBombUi *bombUi);
Q_INVOKABLE int size();
void Q_INVOKABLE getMemory();
Q_INVOKABLE void clearList();
CStructBombUi* getValue(int index) const;
QList<CStructBombUi *> copyList();
signals:
void bombsUiChanged();
public:
int lastAdded;
private:
CStructBombUi *item;
QList<CStructBombUi*> m_BombsUi;
i register how qmltype
qmlRegisterType<ListBombsUi>("BombsListUiModel", 1, 0, "ListBombsUi");
definition of main methods of ListBombsUi
ListBombsUi::ListBombsUi(QObject *parent):QObject(parent)
{}
QQmlListProperty<CStructBombUi> ListBombsUi::bombsUiList()
{
return QQmlListProperty<CStructBombUi>(this, &m_BombsUi, &ListBombsUi::appendBombUi,
&ListBombsUi::listSize,
&ListBombsUi::bombUiAt,
&ListBombsUi::clear);
emit bombsUiChanged();
}
void ListBombsUi::appendBombUi(QQmlListProperty<CStructBombUi> *list, CStructBombUi *pdt)
{
ListBombsUi *bombsList= qobject_cast<ListBombsUi *>(list->object);
if(bombsList) {
pdt->setParent(bombsList);
bombsList->m_BombsUi.append(pdt);
bombsList->bombsUiChanged();
}
}
void ListBombsUi::clearList()
{
m_BombsUi.clear();
emit bombsUiChanged();
}
void ListBombsUi::addBomb(CStructBombUi *bombUi)
{
m_BombsUi.append(bombUi);
emit bombsUiChanged();
}
definition in main class for two data, i use the first as aux, but is possible use the second directly(their are my idea originallly)
QList<CStructBombUi * > listBombs;
ListBombsUi *listBufferBombs;
i assign a listBufferBombs to element in qml
listBufferBombs = mainObject->findChild<ListBombsUi*>("listGralBombs");
method for expose data to qml
void EgasWindowWork::setDataOfBombsInModels()//, const QList <CEstrucBombUi> *const dataArrayBombs)
{
if( (mainObject) ) {
CStructBombUi e,k,j;
e.initializing(QStringList()<<"text1"<<"text2"<<"text3");
e.update(QString("15"), QString("1"), QString("1"), QString("1"),QString("1"));
k.initializing(QStringList()<<"text1"<<"text2");
k.update(QString("2"), QString("2"), QString("2"), QString("2"),QString("2"));
listBombs.append(&e);
listBombs.append(&k);
for(qint16 i=0; i<listBombs.size() ; i++)
{ listBufferBombs->addBomb( listBombs.value(i) ); }
QMetaObject::invokeMethod(mainObject, "setDataOfModelBombs"); //this method copy the list located in main qml for page
}
the metod in main.qml file
function setDataOfModelBombs()
{
if(itemOfPageLoaded) {
itemOfPageLoaded.listBombs=listed
itemOfPageLoaded.setDataOfBombs() //this function put every data inside the every field of qml gui element
}
}
declaration of loader element in main.qml file
Loader{
id: pageLoader
focus: true
//anchors.horizontalCenter: parent.horizontalCenter
width: parent.width
height: parent.height-50
anchors.top: headerIcons.bottom
objectName: "switchPages"
z: 2
source: "BombsUi.qml"
property bool valid: item !== null
Binding {
target: pageLoader.item
property: "numberBombs"
value: numberOfBombs
when: pageLoader.status == Loader.Ready
}
}
method in qml file loaded as page
function setDataOfBombs()
{
var size=newList.size()
arrayBombs.model=size //i use a repater container, and model is the number of elements loaded
if(size>0) {
for(var i=0; i<size; i++) {
//exactly in the next line the error happens
arrayBombs.itemAt(i).priceText=newList.bombsUi[i].ultimateProductPrice
arrayBombs.itemAt(i).volumeText = newList.bombsUi[i].ultimateProductVolume
//exist mor date, but with this are sufficient
}
}
}
and here is declaration of element repeater-grid
Item{
width: parent.width; height: parent.height
Item{
id: bombsArea
height: parent.height; width: parent.width*0.7
anchors.leftMargin: 10
y: 3
x: 2
Grid{
id: gridOfBombsModel
width: parent.width; height: parent.height
spacing: 7
rows: 6; columns: Math.round((parent.width/165))
Repeater{
id: arrayBombs
BombModel{
numberBomb: (index + 1)
MouseArea{
anchors.fill: parent
onClicked:{
parent.borderProperties.color="red"
parent.borderProperties.width=1.5
}
}
}
}
}
}
the program load the page 1 ok, but i change a page "n" and return to page 1, crashes. i accept alternatives to, Thanks for your help.
Well, i detected two things, fail in constructor of CStructBombsUi and i descart use of auxiliar list, and the use of CStructBombsUi* exclusively, and change the function in qml file, i show the changes.
Changes in main.qml
function setDataOfModelBombs()
{
if(itemOfPageLoaded) {
itemOfPageLoaded.numberBombs=listBombs.size()
itemOfPageLoaded.setDataOfBombs(listBombs.bombsUi)
}
}
changes in detailsbombs.qml (file loaded as page), and here i don't instance a ListBombs
function setDataOfBombs(bombsUi)
{
if(numberBombs>0) {
for(var i=0; i<numberBombs; i++)
{
arrayBombs.itemAt(i).priceText=bombsUi[i].ultimateProductPrice
arrayBombs.itemAt(i).volumeText = bombsUi[i].ultimateProductVolume
arrayBombs.itemAt(i).amountText= bombsUi[i].getUltimateProductMount()
arrayBombs.itemAt(i).fuelText= bombsUi[i].getUltimateProductName()
if(bombsUi[i].getFuels())
{arrayBombs.itemAt(i).setListOfFuelsInBomb( bombsUi[i].getFuels() ) }
}
}
}
The next line don't exist more
QList<CStructBombUi* > listBombs;
And every is a pointer
CStructBombUi *e=new CStructBombUi();
i don't use a list of values, with this adjusts the program don't crashes

Qt 5.2 QObject::connect: Cannot connect (null)::

I'm a noob - not good with QML or C++ yet, but getting there. I seem to have hit a stumbling block I can't get past. I'm receiving the following error in my attempt to run a build and I'm not sure what I missed in my code...
**QObject::connect: Cannot connect (null)::buttonClicked_enable() to TLA_Funcs::sys_enable()
**
I've looked through the other versions of the question here and it seems that I have my code correct, but I still get the error. Can someone take a peek? Here's the relevant sample of my code (the rest is too long and I left out the guts of the function - too long).
QML Code:
Rectangle {
id: main
width: 800
height: 600
color: "#abcfe9"
border.width: 4
border.color: "#000000"
signal buttonClicked_enable()
Button {
id: enable
x: 628
y: 55
text: "ENABLE"
onClicked:buttonClicked_enable()
}
//....
}
My class header:
#ifndef TLA_FUNCS_H
#define TLA_FUNCS_H
#include <QObject>
class TLA_Funcs : public QObject
{
Q_OBJECT
public:
explicit TLA_Funcs(QObject *parent = 0);
signals:
public slots:
Q_INVOKABLE void sys_enable(){return ;}
private:
};
#endif
And in my main.cpp file:
#include "TLA_Funcs.h"
TLA_Funcs::TLA_Funcs(QObject *parent) :
QObject(parent)
{
}
int main (int argc, char*argv[]) {
QGuiApplication app(argc, argv);
QQuickView *view = new QQuickView(QUrl("main.qml"));
view->show();
QQuickItem *item = view->rootObject();
TLA_Funcs *funcs = new TLA_Funcs();
QObject::connect(item, SIGNAL(buttonClicked_enable()), funcs, SLOT(sys_enable()));
}
I've defined the signals in the parent rectangle, and in the button code I've tried using:
onClicked:main.buttonClicked_enable()
as well as:
onClicked: {
buttonClicked_enable()
TLA_Funcs.sys_enable()
}
That didn't help either. I also tried defining the functions under "signal" in the class, but that made more of a mess. Can someone at least point me in the right direction, and keep in mind, I'm still a noob... Thanks All!!!
Problem Solved: there was an error in the .pro file. I copied the code into a new project and it worked correctly 100%. Thanks all for the help!