As you may have figured out from the title, I'm having problems converting QByteArray to an integer.
QByteArray buffer = server->read(8192);
QByteArray q_size = buffer.mid(0, 2);
int size = q_size.toInt();
However, size is 0. The buffer doesn't receive any ASCII character and I believe the toInt() function won't work if it's not an...
After asking my previous question about Uniscribe glyph kerning, and not yet receiving an answer, plus further reading on google etc, it seems Uniscribe may not support extracting glyph kerning information from a font.
I therefore have a simple followup question - are there any good examples (preferably with some C++ code) of extracting...
I have a Qt Application and I use qDebug message for my application.
However I have gotten lazy and left in a load of:
#include <QDebug>
in my header files. Should I remove them for a production deployment and what benefit will it give?
...
I have a building environment where I add some prepending and appending lines to each Makefile generated.
It would be nice if I could put this lines into the qmake generated file via my project file (*.pro).
Of cause I can do this via some easy shell scripting but it would be much nicer to do it from inside of the project file. Is ther...
My team is planning to develop an application that is initially targeted for Windows but will eventually be deployed cross-platform (Mac, Linux and potentially embedded devices). Our decision is whether to use C#/.NET or generic C++ (with Qt as the user interface library). We’re projecting that by using C#, we can develop our product f...
Right now I have some libraries that link easily to Visual Studio projects but I can't figure out how to link them with Qt. My idea is to write a VS project that wraps the functionality I need from the libraries, then compile that to a library which can be linked to Qt. From my understanding, VS and Qt use compilers that create incompa...
Hi all,
I am interfacing with an external device which is sending data in hex format. It is of form
> %abcdefg,+xxx.x,T,+yy.yy,T,+zz.zz,T,A*hhCRLF
CR LF is carriage return line feed
hh->checksum
%abcdefg -> header
Each character in above packet is sent as a hex representation (the xx,yy,abcd etc are replaced with actual numbers)....
I have a QImage that I would like to put on the clipboard, which I can do just fine. However the transparency is lost when that data is pasted into a non-Qt application. The transparent part just comes out as black. I tried saving the data as a transparent PNG but nothing is usable on the clipboard.
This is what I have so far:
QImag...
I want to create a program, which can encrypt and decrypt a complete file with an individual password. Is there any way to manage this in Qt and/or C++ and how?
...
I am not sure about the nature of the signal/slot mechanism in QT 4.5. When a signal is emitted, is it a blocking function call or a thread? Say this
emit GrabLatestData();
// proceed with latest data
Will all the signal/slot chain be resolved before proceeding to the next line?
...
Hi all,
I noticed a very interesting finding. I was testing my application involving a custom made GUI element which was being updated by data coming from an external source. The update of GUI was done using a slot(Qt specific detail) function whenever data arrived on serial port. Now the data was coming a rate of 10 packets a second i....
I'm using Qt framework which has by default non-blocking I/O to develop an application navigating through several web pages (online stores) and carrying out different actions on these pages. I'm "mapping" specific web page to a state machine which I use to navigate through this page.
This state machine has these transitions;
Connect, Log...
My initial goal was to get Qt Creator and Visual Studio 2008 to create compatible libraries, so what I've done so far was open a VS command prompt, go to my Qt folder and then run configure.exe followed by nmake to recompile the Qt libraries with VS. The problem is that now Qt creator won't compile anything. The compiler output shows t...
I have a LabVIEW 8.6 program that is using a DLL written in Qt; the DLL listens to a TCP port for incoming messages and updates some internal data. My LabVIEW program calls into the DLL occasionally to read the internal data. The DLL works perfectly (i.e., receives data from the TCP port) with another Qt program. However, it does not ...
I'm trying to get my Visual Studio Qt plug-in to work, so to recompile the Qt libraries i ran the following commands from a VS command prompt:
c:\*Qtfolder*>configure -platform -win32-msvc2008
After this I ran nmake and started the compilation process. It went for about 45 minutes before aborting due to linking errors. I got a total ...
My "EditorView" (a QGLWidget) is being resized twice when it's created. It starts at say 846x630, then shrinks to 846x607 (losing 23 pixels in height). Created like this:
EditorWindow::EditorWindow() {
Q_INIT_RESOURCE(icons);
readSettings();
setWindowTitle("Q2D Map Editor");
createActions();
createMenus();
cre...
Hello,
How i can add QRadioButtons in a QFrame on runtime?
Thanks.
...
Using Qt, I'm attempting to read the contents of the stdin stream in a non-blocking fashion. I'm using the QSocketNotifier to alert me when the socket has recieved some new data. The setup for the notifier looks like this:
QSocketNotifier *pNot = new QSocketNotifier(STDIN_FILENO, QSocketNotifier::Read, this);
connect(pNot, SIGNAL(activa...
Hello,
I would like change the QFrame Background at runtime, but, i would load the background from disk(an image).
Setting stylesheet at QFrame not work's, because image isn't in resources.
One way is set a QPushButton icon, for example:
QPixmap img("/images/01.png");
ui.pushButton->setIcon(QIcon(img));
But, an QPushButton isn't use...
Is it possible to create custom dock areas using Qt 4.4. I know this is possible in Qt 3 as this document suggests. Excerpt from document"...If you need to create your own dock areas we suggest that you create a subclass of QWidget and add your Q3DockAreas to your subclass...". However, it seems to me that in Qt 4 Q3DockArea has been rem...