Top "Qtcore" questions

Questions related to the QtCore module that provides core non-graphical classes used by other modules.

QString to char* conversion

I was trying to convert a QString to char* type by the following methods, but they don't seem to work. //…

c++ qt qstring qtcore
QByteArray to QString

I'm having issues with QByteArray and QString. I'm reading a file and stores its information in a QByteArray. The file …

c++ qt qstring qtcore qbytearray
How to find Version of Qt?

How do I know which version of Qt I am using? When I open Qt Creator it shows "Welcome to …

qt4 pyqt qt-creator qtcore qtcpsocket
Qt: *.pro vs *.pri

What is the difference between *.pro and *.pri configuration files for qmake? What should go into a *.pro file and …

qt qmake qtcore
Convert const char* to QString

I have to use the output of a function of a type const char* and I need to convert it …

c++ qt qstring qtcore const-cast
How to set Input Mask and QValidator to a QLineEdit at a time in Qt?

I want a line edit which accepts an ip address. If I give input mask as: ui->lineEdit->…

c++ qt qtgui qtcore qlineedit
How to initialize QVector

I am new to c++ and Qt and I am trying to initialize a QVector, which is a class member …

c++ qt qtcore qvector
QString:number with maximum 2 decimal places without trailing zero

I have a division like this: number / 1000.0 Sometimes it gives answers like 96.0000000001, sometimes the division works as expected. I want …

c++ qt precision qstring qtcore
No matching function for QObject::connect

I'm writing a program that send an UDP frame every 10 mS. Here's how my program is supposed to work : I've …

c++ qt qtcore qobject qt-signals
Get relative path from a file in Qt

I am trying to get the relative path from files that I would like to write. Here a situation: I …

c++ qt qtcore qdir qfileinfo