I installed Qt SDK (Qt framework + Qt Creator) but didn't like the layout of folders so I deleted it (without uninstalling), moved framework in one place and Qt Creator in another and installed Qt framework and Qt Creator separately placing each over the respective old one.
The problem is Qt Creator in Projects/Build Settings/Build Step...
Unlike std::map and std::hash_map, corresponding versions in Qt do not bother to return a reference. Isn't it quite inefficient, if I build a hash for quite bulky class?
EDIT
especially since there is a separate method value(), which could then return it by value.
...
I use buildbot to compile my Qt/C++/nmake project.
I would like to add the version number to the executable and the company details (on the properties of the file).
Does anybody know where I can set this information?
Note: I am using buildbot not Visual Studio so I need a command line way of doing this.
...
I am using Qt Creator and have a Qt GUI project that depends on a C++ static library project. I want to link the release version of the GUI app with the release build of the .lib and the debug release of the GUI app with the debug .lib. I have found out how to add additional libraries to the project by including a line like the followi...
hey,
I have a DLL in wich I would like to take a reference to a QObject and manipulate it, without actually creating an interface. So, I included "Qt/qobject.h" and compiled, but the compiler (Visual Studio 2008 pro) gives me syntax errors. It looks like it doesn't recognize the QThread object. How do I use a QObject in my dll? Is this ...
Hi guys. I have a small trouble with signal/slot in Qt.
I have an class wich has public slot:
void doSomething();
In constructor of this class i do:
this->connect( ui->textFrom, SIGNAL(returnPressed()),
this, SLOT(doSomething()) );
I have QLineEdit - textFrom object.
../moc_mainwindow.cpp:66: undefined reference to...
Hi all,
I am using select call to communicate with an external subsystem (protocol for the same has been provided and implemented as a Qt thread) using serial port RS232. We do not have the hardware for the external systems and thus we have developed in house simulators using .Net 2.0 and C# to mimic the behavior of the underlying subsy...
I need to step through the Qt code to help solve a bug in my C++ application. I've downloaded qt-mac-opensource-src-4.5.2.tar from here and followed the install instructions that came with this:
unpacked the file to /tmp.
typed ./configure -debug.
typed make.
typed sudo make install.
edited the PATH environment variable as instructed.
...
Hello, I am new to QT and have one error I am unable to fix...
I have a bunch of windows (VS2005) static library file (.lib). And I am testing if they work well with QT. So I took the most simple library that I have. (Called "MessageBuffer").
So I added MessageBuffer.h to the main.cpp, and added the location of thoses file in the INCLU...
I want to write an application that can access a table in the database. I took QSqlTableModel as model component for the table.
The problem with the QTableView is that it seems to have no method that returns the currently selected record in the table so i took the QTableWidget class which interhits QTableView.
But when i try to set the...
Hi! I'm newb to Qt and got stuck in a signal/slot mechanism. I have a toolbar with a number of tool buttons, each associated with some widget. The task is to show appropriate widget when tool button is clicked. I want to write a single slot that will handle the associations, but I can't figure out how to distinguish what button triggered...
Hello.
I have the following code.
QString fileName = QFileDialog::getSaveFileName(
this,
tr("Output Image file"),
(""),
tr("PNG (*.png);;JPEG (*.JPEG);;Windows Bitmap (*.bmp);;All Files (*.*)")
);
if(fileName != "")
{
QwtPlot* pPlot = ...
QSize size = pPlot->size();
QRect printingRect(QPoint(0, 0), size);
QPi...
Hello, I am new to QT and I am doing some learning.
I would like to trigger a slot that modify a GUI widget from a C++ thread(Currently a Qthread).
Unfortunatly I get a: ASSERTION failed at: Q_ASSERT(qApp && qApp->thread() == QThread::currentThread());
here is some code:
(MAIN + Thread class)
class mythread : public QThread
...
I am using QT4 and dynamically adding entries to a QMenu. Is it possible to sort the entries in the QMenu without deleting it and creating a new one?
I originally thought there was a function to insert at a specific location so I could sort on insert, but I have not been able to locate it.
...
I would like to call some custom copy code when the user releases Ctrl+C. When 'C' is released before Ctrl, Qt sends a key event that matches with QKeySequence::Copy. When Ctrl is released before 'C', the release event does not match.
When the key release event comes in with Ctrl, is there a way to see if 'C' is still being held down?
...
Hi,
I have a dynamic library that works fine, and I would like to use a QObject in it. After including the "qobject.h" header, I compile adn evrything is fine. But when I try declaring a QObject, the compiler always gives me a "identifier not found" error. I tried foward eclaration of the QObject class, it did not help. It's weird becaus...
I am working on a simple drawing widget in Qt (all of the following is within one class). In the header file, I have defined
private:
QPointF translateToCanvas (QPointF input);
and in the CPP file I have defined
QPointF translateToCanvas (QPointF input) {
return input - QPointF(CANVAS_MARGIN_X, CANVAS_MARGIN_Y);
}
Somewhere el...
Possible Duplicate:
Is Qt worth learning?
I've been considering the pros and cons of putting my hands on Qt...
Still I can't figure out the exact advantages, apart from cross-platform compatibility.
Any help from persons who have been working with Qt and can explain some things is welcome.
...
How do I get a unique WindowRef from a Qt application that includes docked windows on the Mac?
My code boils down to:
int main(int argc, char* argv[])
{
QApplication* qtApp = new QApplication(argc, argv);
MyQMainWindow mainwin;
mainwin.show();
}
class MyQMainWindow : public QMainWindow
{
//...
QDockWidget* mDock;
MyQ...
I am reading through the examples on the Qt page and am wondering why they add references to already existing classes in their code example:
#ifndef HTTPWINDOW_H
#define HTTPWINDOW_H
#include <QDialog>
class QFile;
class QHttp;
class QHttpResponseHeader;
class QLabel;
class QLineEdit;
class QProgressDialog;
class QPushButton;
class H...