qiodevice

QMediaplayer streaming from a custom QIODevice with encryption on Mac OS (10.9)

爷,独闯天下 提交于 2019-12-19 10:32:26
问题 i'm currently porting an application from Qt4(.8.4) to Qt5(.2.0). I'm nearly done with all the known changes like deprecated toAscii()-function, missing QtGui and so on. Now we had a music player using the phonon framework which is not supported any more and got replaced by the QtMultimedia module including the QMediaPlayer and a bunch of Audio-Handling classes. Our implementation of the player takes a custom QIODevice. This device provides an interface to encrypted audiofiles on the disk.

How to communicate Qt applications two-way

江枫思渺然 提交于 2019-12-13 03:51:09
问题 I want to create two-way communicate beetwen my Qt Apps. I want to use QProcess to do this. I'm calling sucesfully child app from root app and sending test data without any erro, but I can't recive any data in child app. I'll be gratefull for any help. I'm using Qt 4.7.1. Below my test code: Root app: InterProcess::InterProcess(QObject *parent) : QProcess(parent) { process = new QProcess(this); process->start(myChildApp); process->waitForStarted(); process->setCurrentWriteChannel(QProcess:

How to change POST data in qtwebkit?

99封情书 提交于 2019-12-12 04:53:51
问题 For change POST variables in qtwebkit need change or replace outgoingData in createRequest(...). How to create own <PyQt4.QtCore.QIODevice object at 0x03BA...> not QFile or QByteArray. Exactly QIODevice object! It is needed for creation of writable device. Or how to convert <PyQt4.QtCore.QBuffer object at 0x03BA...> to <PyQt4.QtCore.QIODevice object at 0x03BA...> . This device most used in QNetworkAccessManager: https://qt.gitorious.org/qt/webkit/source

how to report progress of data read on a QuaGzipFile (QuaZIP library)

廉价感情. 提交于 2019-12-11 12:18:11
问题 I am using QuaZIP 0.5.1 with Qt 5.1.1 for C++ on Ubuntu 12.04 x86_64. My program reads a large gzipped binary file, usually 1GB of uncompressed data or more, and makes some computations on it. It is not computational-extensive, and most of the time is passed on I/O. So if I can find a way to report how much data of the file is read, I can report it on a progress bar, and even provide an estimation of ETA. I open the file with: QuaGzipFile gzip(fileName); if (!gzip.open(QIODevice::ReadOnly)) {

how does readyRead() work in Qt?

倾然丶 夕夏残阳落幕 提交于 2019-12-03 15:16:38
问题 It's my first question on this website ! I have some trouble reading datas from a COM port, I send a complete message from another COM port, and when I receive it with Qt, it's always cut in multiple submessages. void SerialPortReader::init() { connect(m_serialPort, SIGNAL(readyRead()), this, SLOT(readData())); } void SerialPortReader::readData() { // m_serialPort->waitForReadyRead(200); QByteArray byteArray = m_serialPort->readAll(); qDebug() << byteArray; if(byteArray.startsWith(SOF) &&

QSerialPort is causing a program stop (endless loop?) if opening device

Deadly 提交于 2019-12-01 09:05:16
I want to write on a serial device. Unfortunately I have the feeling the QSerialPort is not properly implemented under linux. In contrast to other methods (python) I get !sometimes! a hang of the program when I try to call: serial.open(QIODevice::ReadWrite) I am using the example from http://qt-project.org/wiki/QtSerialPort (see below). The QSerialPortInfo is working properly so that I can search for my device before I open it. The problem appeared in all Qt 5.* series. I am currently using 5.3 beta from the OpenSuse repository. Other tools or methods proof, that the device is working (Windows

QSerialPort is causing a program stop (endless loop?) if opening device

旧巷老猫 提交于 2019-12-01 05:51:59
问题 I want to write on a serial device. Unfortunately I have the feeling the QSerialPort is not properly implemented under linux. In contrast to other methods (python) I get !sometimes! a hang of the program when I try to call: serial.open(QIODevice::ReadWrite) I am using the example from http://qt-project.org/wiki/QtSerialPort (see below). The QSerialPortInfo is working properly so that I can search for my device before I open it. The problem appeared in all Qt 5.* series. I am currently using 5

Is there an intra-process local pipe in Qt?

ⅰ亾dé卋堺 提交于 2019-11-27 05:31:06
Does Qt have a QIODevice pair that would work for intra -process point-to-point communications? One could use the concrete QTCPSocket or QLocalSocket , but the server-side connection API is a bit cumbersome, and it seems wasteful to force the data through the OS. The following is a usable, rudimentary implementation. It uses an internal signal-slot pair to push the data to the other endpoint. That way either end of the connection can live in any thread, and the ends can be moved between threads without losing data or inducing any races. The private QRingBuffer is used in lieu of reinventing

Is there an intra-process local pipe in Qt?

╄→尐↘猪︶ㄣ 提交于 2019-11-26 11:37:01
问题 Does Qt have a QIODevice pair that would work for intra -process point-to-point communications? One could use the concrete QTCPSocket or QLocalSocket , but the server-side connection API is a bit cumbersome, and it seems wasteful to force the data through the OS. 回答1: The following is a usable, rudimentary implementation. It uses an internal signal-slot pair to push the data to the other endpoint. That way either end of the connection can live in any thread, and the ends can be moved between