Hey everyone,
I'm facing some trouble when using the class QNetworkAccessManager.
I use it to download a simple file from an url like "http://www.foo.com/bar/foobar.txt".
When I start a download I use :
m_pNetworkReply = m_pNetworkAccessManager->get(QNetworkRequest(m_CurrentFileToDownload));
Then I connect a few slots to receive, f...
Hi
How to use QPainter and QTimer to draw a real time sinusoid like sinus(2*w*t+ phi).
thanks.
...
Hi, i have a little Application where i can choose items by pressing ^, 1, 2, ...
The problem is, when i press tab the ^-key (Qt::Key_AsciiCircum) doesn't work anymore until i press the tab-key again. Anyway the numbers are still working and are handled in the same keyPressEvent(...) !
I tried to also handle the tab-key but it seems it...
I'm using Qt to write a database type program where the majority of inputs will be single lines, not documents of arbitrary length.
Do I understand correctly that QPlainTextEdit is the most appropriate widget for this kind of input?
If so, how do you set parameters for this kind of input? In particular:
Height to the right value to co...
I want to use Qt to create a simple GUI application that can play a local video file. I could use Phonon which does all the work behind the scenes, but I need to have a little more control. I have already succeeded in implementing an GStreamer pipeline using the decodebin and autovideosink elements. Now I want to use a Qt widget to chann...
In a simple form I made a few buttons and put a horizontal layout. When mouse leaves the area one of the buttons, the last one, should be hided. Using button->hide() it works, but all the buttons are rearranged by the layout manager. What I want is that all other buttons continue in their positions. I tried replacing the widget with a wi...
I building a game with QT. Every objects on my GraphicsScene inherits from GraphicsPixmapItem (Player, Obstacles, bombs...). I would like to implment collision effects. For example when the player gets hover a bonus he can pick it.
With the QT framework I can get the collidings items but I don't know which type they are as there isn't i...
I'm building a game in c++ using Qt. I got the collision detection right using GraphicsItem methods the thing is that I don't know how to deal with every different collision type as there is different objects with different behaviour.
...
When I try to change the location of a layout with setParent the result is non-functional or odd.
the following works:
ui.txDiag_1->setParent(ui.tab_2);
movingHlayout = new QVBoxLayout(ui.tab_2);
movingHlayout->setSpacing(3);
movingHlayout->setMargin(3);
movingHlayout->setObjectName(QString::fromUtf8("movingHlayout"));
movingHlayout->a...
I have an application in which I would like to connect whatever signal is emitted when a pyqt4 dialog is displayed in order to do execute an initial method. I don't want the method to be called in the __init__ method for a number of reasons. I've spent quite some time searching but I have yet to find an answer. I'm sure there is a simple...
I'm loading content into QWebPage, using load() method.
But my loadStarted(), loadFinished() and loadProgress() handlers are calling several times.
How can I detect that page is loaded completely with all it's content?
...
Hello all,
I'm new to PyQt though i know python a bit.. I wanted to Qt designer for GUI programming since it'll make my job easier. I've taken a simple dialog in Qt designer and converted using pyuic4.
from PyQt4 import QtCore, QtGui
class Ui_Form1(object):
def setupUi(self, Form1):
Form1.setObjectName("Form1")
...
What's the proper way for the main GUI thread to update a QProgressDialog while waiting for a QFuture. Specifically, what goes in this loop:
QProgressDialog pd(...);
QFuture f = ...;
while (!f.isFinished()) {
pd.setValue(f.progressValue());
// what goes here?
}
Right now I have a sleep() like call there, but that's not optimal (...
I have a bunch of qComboboxes in a table.
So that I know which one was triggered I remap the signal to encode the table cell location (as described in http://stackoverflow.com/questions/1332110/selecting-qcombobox-in-qtablewidget)
(Why Qt doesn't just send the cell activated signal first so you can use the same currentRow/COlumn mechani...
I have about 40 buttons that are also indicators (On or Off) and once a second I refresh the color of these indicators depending on the state. I do this by changing the stylesheet. Is it over kill to do this and if so should I only set a new stylesheet when it the indicator has changed state or should I use something like QBrush?
...
I've got a PyString* object that I would like to see the contents of. Is there any way to see the text of the PyString using Qt Creator's debugger?
PyObject *import_str = PyString_InternFromString("__import__");
If it makes a difference, Qt Creator is a front end to GDB.
...
Hi there.
I need a hint on handling data structures send via DBus. The running service returns an Array of 2-Tuples containing two ints. In Python a(ii).
Calling the method from the Qt app returns me:
QDBusMessage answer = dbus_iface.call("hello", 'blaaa', 3, 4);
QList data = answer.arguments();
qDebug() << answer:
QDBusMessage(type=...
Any idea on how to save an array of unsigned char to a field in MySQL database ? I'm considering BLOB, but how can I convert it to QByteArray and convert it back to an array of unsigned char when I want to ? BTW, I'm trying to save fingerprint data.
...
What could be cause of QAbstractSocket::UnknownSocketError when using QTcpSocket?
CODE
I'm getting this error code with the following code:
this->connect(socket, SIGNAL(socketError(QAbstractSocket::SocketError)), SLOT(handleSocketError(QAbstractSocket::SocketError)));
...
void MyClass::handleSocketError(QAbstractSocket::SocketError ...
Can someone suggest what's the best uses for those libraries today? Is it just GUI, or do they have database, XML, networking, threading, etc support too?
I was reading about them, and considered starting to learning/using one of them.
What is the most common one? What's the difference between them? Why would you choose one over the ot...