Questions tagged [Qt] (1382)

1
answer

How to display count down time in label qt?

How to make a countdown was displayed in the label,that's what I did but I have displays the current time QTextStream in(&file); QTime start = QTime::currentTime(); while (!in.atEnd()) { QString line = in.readLine(); if (line.contains(v) || line.contains(s) || line.contains(k) || line.contains(m) || line.contains(q)...
juana_Predovic asked April 19th 20 at 12:45
0
answer

How to get the type of the element in focus in any third-party application?

There is a virtual keyboard. You need to open it when the focus is in a text box. The problem is that this should work with any third-party applications. Tools: Qt, C++, Xlib
elbert_Tromp22 asked April 19th 20 at 12:37
1
answer

Why not read the file again?

Good afternoon. Such problem: the function opens the file, creates a thread, reads from it a string and returns. Data are recorded in a TreeWidget. And so to the end. Then the file is closed. Created a button in the app, which first clears TreeWidget (tested, all works correctly), and the second calls the function above. W...
neoma.Bauch80 asked April 19th 20 at 12:32
1
answer

How to make a global QTextStream cout(stdout)?

There is a main function and it has two? How and where to create the object QTextStream cout(stdout) to implement the class I was able to use it in main?
Ferne.Reichert asked April 19th 20 at 12:29
1
answer

How to overwrite a text file in Qt C++?

All kind time of day. Need advice. There's a text file, you need to remove the line. On the web I read that this can be done using rewrite, but how to do it I found. Note that the file size can be larger than the RAM. My version: I Create the second file. And using terms written in rows that must not be removed. Is it right...
lilliana91 asked April 19th 20 at 12:18
1
answer

How to put the webkit qt4 on Ubuntu 18?

Hello. There is a legacy project. Moved to udalenku. All set, and qt4.8.7 do not pull in webkit. I do not understand what to do. List of installed libraries: spoiler libqt4-dbus/bionic,now 4:4.8.7+dfsg-7ubuntu1 amd64 [installed, automatic] libqt4-DRI/bionic,now 4:4.8.7+dfsg-7ubuntu1 amd64 [installed, automatic] libqt4-DRI-g...
Mallie.Bechtelar asked April 19th 20 at 12:05
2
answers

Because may be error output Cyrillic Text qml?

There was an unusual problem, which during the day, I have not found. The problem occurs only on 1 PC with Windows 10. When you try to output the Russian text in a qml Text instead of Russian letters displayed characters, as I thought, of the Greek alphabet. The first conclusion that shot down the encoding, but the mechanis...
Richmond_Kuval asked April 19th 20 at 12:02
1
answer

QT and Cyrillic in COM?

Hello!! Receive data from COM port. The device transmits the data with the Cyrillic alphabet. Accordingly, I have gibberish. How can I fix it? Used TextCodec, but does not help. Here is the code: QString byte; QByteArray data; byte=serialPort->readAll(); data+=byte; QTextCodec::setCodecForLocale(QTextCodec::codecForName...
Jessie.Jenkins asked April 18th 20 at 13:35
0
answer

How to load text from file into TextArea with line wrapping?

import QtQuick 2.9 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 TextArea { id: editor text: "G0 Y0 X11" font.pixelSize: 10 textFormat: TextEdit.RichText selectByMouse: true function loadTextFile(fileUrl){ var xhr = new XMLHttpRequest; xhr.open("GET", fileUrl); xhr.onreadystatechange = function...
Magdalen69 asked April 18th 20 at 13:31
1
answer

How to connect MySQL to Qt Creator?

Hello, previously when working with Qt Creator and MySQL, no problems, did everything according to the instructions in the official documentation, as well as on the advice of people from other sites and this forum, when previously asked this question. Database driver successfully was. Now, after installing the new Qt Creato...
Eldon_Feeney asked April 18th 20 at 13:30