I'm using Qt and want a platform-independent way of getting the available free disk space.
I know in Linux I use statfs and in Windows I use GetDiskFreeSpaceEx(). I know boost has a way (boost::filesystem::space(Path const & p);).
I don't want those. I'm in Qt and would like to do it in a Qt-friendly way.
I looked at QDir, QFile, ...
If I had a class A, where one of its functions does:
void A::func()
{
emit first_signal();
emit second_signal();
}
Assuming that a class B has 2 slots, one connected to first_signal, and the other to second_signal, is it guaranteed that the slot that is connected to first_signal will always be processed before the second_signa...
Is it possible to define the padding of QTableView cells? I would expect this to be possible using CSS stylesheets, but the documentation does not describe a method to do this.
The following stylesheet does not have the desired effect:
QTableView {
padding: 5px;
}
as it influences the padding property of the widget as a whole, not ...
I created an application for Windows in C++ using QT. If I want to port it to Linux or Mac OS, will sizeof(int) or sizeof(long) change? In other words, do types in QT applications for different platforms have similar size?
...
I have a fairly simple app built with pyqt4. I wanted to debug one of the functions connected to one of the buttons in my app. However, when I do the following
python -m pdb app.pyw
> break app.pyw:55 # This is where the signal handling function starts.
things don't quite work like I'd hope. Instead of breaking in the function where ...
I am a newbie who is trying to use the QT creator, I installed the latest version "qt-win-opensource-4.5.1-mingw". Everything was working fine except for launching the QT Designer .. I don't really know what is the exact problem .. but whenever I try to edit my project visually or even to launch the QT Designer itself, the windows pops u...
How to put QGraphicsScene's (0,0) to top-left corner of QGraphicsView?
...
Greetings,
I'm interested in calculating the physical position of a node in QTreeView and can't find a way to do this (other than calculating it myself, which is cumbersome and error prone given the robustness of QTreeView).
Is there a standard way of finding the draw position of data associated with a QModelIndex (something similar to...
Hi everyone,
I'm writing Remote Desktop clone in C++ using QT. So far I'm able to move the mouse cursor around fine. QT has a nice setPos function for that. However, I'm a bit lost as to what API/Library to use for simulating mouse button clicks.
One method I'm aware of is to send the WM_(event) to a window using the window's HWND. How...
I have about a few problems with a new install of the Qt SDK. I probably only need advice, but specific answers are also welcome. Before I begin a mini-story, I am running RHEL5 on academic license under VirtualBox on OSX 10.6. Using Qt version 4.5.3. This is my situation...
1.) I couldn't compile because g++ wasn't found. I fixed this ...
I have a Qt-project that builds a dll/shared-library and another Qt-project that tests the library.
Is there any good way to have qmake copy the dll to the output-folder of the test-project?
...
When installing Qt, I unchecked the MinGW installation option as I have it already installed. Now after installing I am not able to build an example program I found in a book. All the build options in the menu are disabled. the code I am trying to execute is:
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
...
I'm writing an LCD controller, and one feature I want to add is the ability to catch keyboard strokes so that you can do stuff like instant messaging over the LCD. I found xsnoop.c but it's outdated. I'm using xorg-x11-server 1.6.4-0.1.fc11 on Fedora 11. I'm also using Qt. I didn't find anything in the docs that might help, but figured I...
I would like to build qt and qt application out of the source tree. Do you know how to set from the command line the .obj directory both with configure and qmake?
...
I want to use an older code-fragment in my Qt-project, which is using WinSocks.
I created my program with Qt Creator and I don't know, how I can link to the ws2_32-Library. I already added LIBS += -lws2_32 to my .pro, but nothing happened. So how can I link to this library?
edit: Where can I find the ws2_32.lib to include it? Do I have...
Hello all,
I've been staring at the LGPL for days but can't figure out how to satisfy the legal requirements with respect to redistribution.
I understand the requirements with regards to linking with/modifying Qt but specifically don't know how to (legally) bundle the Qt DLLs with our product.
Our project is a commercial application. ...
I'm working a small qt app (using PyQt4) and I've come up with an idea but I'm unsure as to how to implement it. I have a QTableView that represents some data and I'd like to add another column to the QTableView that contains a checkbox control that could be wired up to some piece of the model. For example, something like this:
Note t...
What is the bare minimum amount of code to create a custom container that would work with Qt foreach macro?
I have this so far
template< class T >
class MyList
{
public:
class iterator
{
public:
};
class const_iterator
{
public:
inline iterator& operator++ ()
{
return *this;
}
};
};
and I'm getting ...
I've got a QList of QLineEdit*'s
QList<QLineEdit*> example;
Example will hold 100 items of lineEdits.
When I try to save or load to a file, it fails to save or load the QList properly, if at all. I get a much lower than expected count of data.
I see on QList<T>'s resource page here that there's the correct operator for << & >>,
ho...
Hello Everybody,
I trying to do a Qtreewidget to attend a customer design suggestion. I am coding it on QtPython. I did a first try using Qt Designer, then generated the code. But when I try to run it, an error comes out:
self.centralwidget.setSortingEnabled(__sortingEnabled)
AttributeError: setSortingEnabled
I googled around, but d...