Split int value from string without QRegExp

I am try to split int value from QString value. For some reason I could not do this. I've tried parse and here is my code: "examle[n] mbits;" "mbits << 3312 kb / s(or sec) << 213 kb / s << 0 kb / sn << 102 mbit/sn "3213 ...
more »

2017-11-15 21:11 (0) Answers

QML: passing JS object to C++ member function

I'm trying to pass a JS object (map) to a C++ member function with a signature Q_INVOKABLE virtual bool generate(QObject* context); by using a.generate({foo: "bar"}); The method is called (detected via breakpoint), but the passed context param...
more »

2017-11-14 14:11 (1) Answers

Issue when searching QTableWidget using wildcards

In my Qt C++ application I have several items in a qtablewidget. A QLineEdit along with a button are used by me in order to search the QTableWidget when a particular word is given to the line edit and the search button is clicked. Following is my cod...
more »

2017-10-27 08:10 (1) Answers

Qt5 QWidget :hover effect delay

I am trying to create any kind of :hover effect on my QWidget with the following CSS: QWidget.mis--MyButton { width: 300px; height: 300px; background: white; /*cursor: pointer;*/ font-family: Calibri; border-radius: 10px; ...
more »

2017-10-26 19:10 (0) Answers

QTouchEvent instead QMouseEvent on Linux

I am trying to handle QTouchEvent from M3 touchscreen in Qt 5.9. I use Qt Finger Print example and it works fine on Windows 7 but on Ubuntu 16.04 I receive mouse events instead of touch events. Is it Qt's foult or wrong OS configuration? What is mor...
more »

2017-10-02 16:10 (0) Answers

Both if else statements executing together

I have written a function to search words in a qtable widget (which has 10 rows) and display the relevant word on the the 1st row if the word is in the table widget. But unforutnately, when I enter a word in the table widget and click the button th...
more »

2017-10-01 05:10 (0) Answers

Fixing wrong JSON data

I'm working with a JSON data that I download from web. Problem with this JSON is that it's contents are incorrect. To show the problem here is a simplified preview: [ { "id": 0, "name": "adsad" }, { "id": "123", "name": "aawew"...
more »

2017-08-26 00:08 (1) Answers

Qml XmlListModel with multiple SOURCES

I do have a bunch of xml files named "config_1.xml", "config_2.xml", "config_3.xml", and so on. Basically, I need to loop from first one to last one, appending in the SAME XmlListModel all the "id" that I find at the query context/info/parameters in...
more »

2017-08-01 18:08 (1) Answers

Extract number from Alphanumeric QString

I have a QString of "s150 d300". How can I get the numbers from the QString and convert it into integer. Simply using 'toInt' is not working. Let say, from the QString of "s150 d300", only the number after the alphabet 'd' is meaningful to me. So ho...
more »

2017-07-26 06:07 (3) Answers

Object stores itself into DataBase

I am new in C++ and Qt and I am developing a simple app that stores and gets different types of employees in a Database. I implemented a hierarchy, Employee is the base class and then I have three different sub-classes : Monthly_Paid_Employee, Hourly...
more »

2017-06-27 13:06 (1) Answers

How to synchronize ios device contact with qt app?

I want to sync up iOS device contacts with an application based on QT platform, I am in search of an API which can do this with qt I find workaround (QT-JNI-Java bridge) for android. http://doc.qt.io/qt-5/qandroidjniobject.html#details It is worki...
more »

2017-06-13 09:06 (0) Answers

QProcess passing (shell) arguments

I'm trying to read the output of a shell script in Qt. However, passing an argument to the shell script doesn't work, as it is ignored completely. What am I doing wrong in the following excerpt? QProcess *process = new QProcess; process->start("s...
more »

2017-06-10 11:06 (1) Answers