qt

How to deallocate memory when a Qt window closes?

I am currently creating a program in Qt, OpenCv, Mac os X. I have a main window, and then a separate window that is opened. I pass the new window several matrix clones in the constructor: ImageWindow *imageWin = new ImageWindow( cvCloneMat(getData->getMasterRawMat(1)), cvCloneMat(getData->getMasterRawMat(2)), cvCloneMat(get...

When using QT in VS2008, IntelliSense does not work properly

I use QT 4.4.2 in Visual Studio 2008. When I am writing code, IntelliSense seems to die - it does not show any methods or data members in QT objects such as QPushButton, does not see the QObject::connect static method, etc. Is it a typical situation or did I do something wrong while installing the library? ...

QT GUI internals - widget painting?

I've been using QT for a while now and I've been wondering about something regarding the way the GUI is painted in Windows. Is it really painting all the buttons, edit boxes, combo-boxes, check-boxes, tabs etc' on its own using QPainter or is it somehow using the native widgets? The fact that it can do custom styling and skinning sugg...

Is there a simple way to restore widget sizes in Qt?

I'm looking for a way to preserve the size of windows in a Qt app. I've seen that there is the possibility of using the following method for every widget: saveGeometry() But really, I don't find this a satisfactioning method. Is there something like setAutosaveGeometry(True)? I'm especially looking for a way to store the widths of t...

How to print a Qt dialog or window?

How do I get Qt to print a complete dialog or window? I could dump the window contents with an external program like xwd and print that, but I would prefer to do it all with Qt. ...

What am I missing from my environment variables for my linker to fail with LNK1181?

I have a Qt project which I have had a debug console displayed whilst I am developing, I am about to ship the product to I removed the qmake console command: CONFIG += console However when I do that I get the following error: link /LIBPATH:"c:\Qt\4.5.0\lib" /NOLOGO /INCREMENTAL:NO /LTCG /MANIFEST /MANIFESTFILE:"./_obj/win32\Lynx.interm...

How to get a line number when parsing with QXmlDefaultHandler?

I am parsing a xml file with QXmlDefaultHandler like this: void Parser::ParseFilename(const char* pFilename) { LOG_DEBUG("Parser::ParseFilename(%s)", pFilename); ClearState(); m_inputFile.setFileName(pFilename); QXmlInputSource source( &m_inputFile ); QXmlSimpleReader reader; reader.setContentHandler( this ); reader.pars...

Qt C++ grammar?

I'm learning Qt, found this: Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::WidgetClass) { ui->setupUi(this); } what is ": QWidget(parent), ui(new Ui::WidgetClass)" mean? And how can I get the C++ document about this? ...

how to use default icons with qt

I'm using only Qt (though PyQt) and I don't get icons when I call e.g. QMessageBox.warning(). Is there a way to use the platform's default icons? Currently I'm using the more complete QMessageBox constructor and calling setIconPixmap. ...

Qt XML Input

I'm trying to input data from an XML file in a C++ program using the Qt tool kit. My XML data is formatted as follows: `<item> <title>title<\title> <tree_loc1>0<\tree_loc1> <parent>parent<\parent> <description>description<\description> <other_info>other info<\other_info> <location>location<\location> <last_mo...

Qt PDF Tutorial?

Where can I find a Qt tutorial in PDF format. I have looked all over google but can't find one. I need to be able to read it offline as I can't always be on the internet. Thanks! ...

In QT, how to make the QDialog non-resizeable and have a fixed size

I have a QT dialog application. Now I dont want that dialog to be resizeable. I am not sure how to achieve this. I tried a bunch of things but still when the dialog launches this dialog can be resized. What is the property that i should set to disable the dialog/Widget resize. I also tried setSizePolicy(QSizePolicy::Fixed); But i g...

Can font size be disabled in QFontDialog::getFont()?

Hi all, I want to allow users to pick a font but the size they choose will have no effect. So it would be best to have that part of the dialog disabled. Is this possible? Thank you! ...

QT4.4 how to get the user settings path

linux: $HOME/.config windows: %APPDATA% mac os: $HOME/.config It can be set using http://doc.trolltech.com/4.4/qsettings.html#setPath, but it seems as I am not able to retrieve it. http://doc.trolltech.com/4.4/qlibraryinfo.html#location QLibraryInfo::LibrariesPath returns the system wide settings dir, which is not what I want. Any i...

Video capture on MacOS

Hi to all I'm wrtiting a C++ application with Trolltech QT Library and I need to capture video stream from a camera and some medical instrumentations. What kind of hardware can I use to do this? I've tried with OpenCV but it doesn't recognize my EyeTV 250. Can I use Pinnacle Video capture for Mac? thanks, Andrea ...

Qt executable

Is there a quick, straightforward way to make a Qt application into an executable? I attempted to follow the instructions at http://doc.trolltech.com/4.1/deployment-windows.html but have been unsuccesfull thus far; I'm unable to Any help would be much appreciated. Thanks! ...

What`s wrong with qt 4.5.0 integration with Visual Studio 2008?

I downloaded and installed qt evaluation for vs2008 and expect it to be integrated with VS, but it is not. It is trial 30 days commercial license. What`s wrong with it or may be I got it wrong? ...

Is QT Jambi dead?

I know they announced in February that it was going to transition to a community-developed model over the next year... but right now, I can't find it on their website, at all, let alone version 4.5 that was supposed to be released this month. I am about to embark on the GUI portion of a major project, and while I had considered using QT...

How do I paint with QPainter?

I have started learning Qt recently. I did not get quite clear how can I paint using QPainter class. Let`s say I want just to place a few points in the window: class PointDrawer: public QWidget { Q_OBJECT private: QPainter p; public: PointDrawer(QWidget* obj=0): QWidget(obj), p(this) {} virtual void paintEvent(QPaintEv...

Qt: QGraphicsScene not updating when I would expect it to.

Ok so I've got a QGraphicsScene in a class called eye. I call a function: void eye::playSequence(int sequenceNum) { for (int i=0; i<sequences[sequenceNum].numberOfSlides(); i++) { presentSlide(sequenceNum, i); time_t start; time(&start); bool cont=false; while (!cont) { time_t now; time(&n...