Questions tagged as 'qt'

2
answers

Call dynamic functions from static function?

I'm having a very silly problem, and I do not know what else to give it, I've tried creating instances but something will be wrong. I have a static function that collects the value of an external window, and depends on the value of that funct...
asked by 30.08.2018 / 12:16
1
answer

How to connect to a wifi with qt

Good afternoon, can someone help me? I need to make an application in c ++ using QT. It has to look for wireless connections and connect to a specific one. I hope you can help me     
asked by 26.10.2016 / 18:10
1
answer

List folders and files in Qt Creator

I want to make a program that tells me what folders and files I have within a given route. The code that I used is the following: #include <QDir> #include <QDebug> int main(){ QStringList lista = QDir("C:/Imagenes").entryList...
asked by 03.10.2017 / 16:25
2
answers

Delete items from a list represented in a QTabWidget

I have a class MainWindow derived from QMainWindow class MainWindow : public QMainWindow { Q_OBJECT private: struct MetaObra { InterfazObra* miobra; QString nombrefichero; MetaObra():miobra(n...
asked by 21.04.2017 / 02:19
1
answer

I can not record .txt files with QFileDialog C ++ QT

This is my code: void MainWindow::save(){ QString fileName = QFileDialog::getSaveFileName(this, tr("Save Text File"), path, tr("Text Files (*.txt)")); if (fileName != "") { QFileInfo info(fileName); path = info.absolu...
asked by 25.02.2016 / 15:58
2
answers

Warning: deprecated conversion from string constant

I have a warning that I can not remove ... it says "deprecated conversion from string constant to char *". The code where he complains is the following: class THREE_DATA_4_COMPUTE { public: THREE_DATA_4_COMPUTE(const QString &c...
asked by 21.02.2017 / 16:09
1
answer

How to implement a class that inherits from QGraphicsItem and behaves like a QGraphicsItemGroup

I am working on a project where I needed to inherit from the class QGraphicsItem of Qt since I needed to have QGraphicsItem with special features (modification of line size, depending on the zoom, setting the boundingRect to the fo...
asked by 21.09.2018 / 10:55
1
answer

Qt Parse of a Json (object within an array)

I have the next json { "Perfiles": [{ "Nombre":"Default", "E/S": { "EntradaHr": 6.45, "SalidaHr": 12.15 } }] } And the following code #include <QJsonDocument> #include <...
asked by 04.05.2018 / 02:50
1
answer

Icon associated with a file type in Linux

I have the following code to get the icon associated with a file type, implemented for Windows : #if defined(Q_OS_WIN) #include <QFileInfo> #include <QtWinExtras/QtWin> QIcon IconFromFile(const QString& fileName) { QIcon...
asked by 29.05.2018 / 07:56
1
answer

QT Doubt graphing path of points

I receive positions in the plane and I want to draw the route. It is not a line, but a path ... that is, I receive every point and I generate a polygon that has a "width of work" of 7, so every point I receive, I generate a polygon of 7 wide and...
asked by 03.05.2018 / 14:13