Qt is a trolltech's software products. It is the multi-platform, C++ Graphical User Interfaces toolkit. Supported platforms are:
tmk is a make program with programming ability by Tcl language. There is qt compiling module which is aware of qt moc compiler and qt environment.
module { qt }
module { qt4 qt4qtcore }
module { qt::mt }
When you calculate a heavy stuff, and you want to visualize it on a 2D image, this tip may help you.
(Notice: If you call many repaint()s in a very short time, you do not need repaint(). In that case, the method update() will work better. In X environment, too many repaint() in short time makes an async server error.)
There are some documents for multi-threading in Qt in the Qt Reference documentation. Please start with ``Thread Support in Qt'' in the document and see also the QThread class documentation.
QWidget::repaint() immidiately schadule the QWidget::paintEvent(). You should use this when you need immidiately update your widget.
QWidget::update() will be update a widget but not immediately for performance optimization.
Both above methods will try to update your widget, but not the image buffer (QPainter). Then next tips is needed.
QPainter::flush() will flushes any buffered drawing operations.
Trolltech has answered this isuue to me and was fixed 2006-12-18's snapshot. So, if you can upgrade it, it should be no problem. (I currently has not time to check that.)
The new Qt4's moc uses static_cast, reinterpret_cast, and const_cast
instead of C style cast by Qt3's moc. I think this is an improvement. However,
the code src/tools/moc/generater.cpp
did not consider the
C++ Digraph, which is (I believe) a pitfall to mock the C++
users. Therefore, the moc
is mocked by this ISO/IEC
9899-1999, Programming Languages - C standard.
#include <QObject> namespace AAA { /** \class BaseA This is almost nothing, but in the namesapace AAA. */ class BaseA { public: BaseA(){} virtual ~BaseA(){} }; } // namesapace AAA namespace BBB { /** \class DerivedB Qt4's moc automatically generates a function called qt_metacast(). In this function, there is a static_cast, (The former mocs generates a C type cast. I see this change is an improvement.) However, global namespece identifier gives a digraph, then, '<:' is translated to '[' because of C++ standard rule. */ class DerivedB : public QObject, public ::AAA::BaseA { Q_OBJECT public: DerivedB() : QObject(0), BaseA() {} virtual ~DerivedB() {} public slots: signals: private: }; } //namespace BBB
% ls qt-x11-opensource-src-4.2.2 % patch -p0 < qt-x11-opensource-src-4.2.2_src_tools_moc_generator_20061216_hitoshi.patch
It seems if you did not filled up some part of the grid cells, the column and row related the empty cell will not show up.
+----+----+----+ | | | C | + A + B +----+ | | | D | +----+----+----+ | () | E | +----+----+----+Then, I have next result.
+----+----+ | | C | + B +----+ | | D | +----+----+
()'s column and row did not show up. Then I added a QLabel("") at the position (), I got what I wanted.
I encountered this with next environment.
I am not sure this is the reason since I do not have a minimal test code.
cerr << "this min size = " << this->minimumSize().width() << ", " << this->minimumSize().height() << endl; cerr << "hbox min size = " << hbox->minimumSize().width() << ", " << hbox->minimumSize().height() << endl;
Q_D(const QBoxLayout); d->minSize = d->minSize + QSize(2 * m, 2 * m);This means there is a QBoxLayoutPrivate class, which you can get by d_func(). Same as Q_Q, but const. This is actually an easy case. But there is no guarantee the a `d' is this `d'. So first you should make it sure.