qt

Auto-expanding layout with Qt-Designer

I'm using the Qt Designer. I want to create a QVBoxLayout which will automatically expand to fill the whole window. The layout of the QVBoxLayout remains fixed. How can I cause the QVBoxLayout to expand and fill the entire window through the designer? ...

Configuration of Qt in Visual C++ 2010

I am using the Visual C++ 2010 compiler. How can Qt be compiled in Visual C++? ...

qt tr() in static variable

Hi all, I have problem concerning translations in qt. All translations in my porject work fine, but one, which is in a static variable of a class. Corresponding part of code looks as follows The header file is similar to this: typedef struct { int type; QString problematicString; } info; MyClass::QObject_Descend...

how to use Qt setWindowFilePath

I can't seem to get setWindowFilePath to work in any of my projects. The value is stored and can be retrieved, but it never shows up in the title bar of my app. It does work correctly in a sample app I downloaded, but I can't find what they do differently. Anyway, here's a simple app I created to demonstrate the problem. I pasted the...

QT progress dialog cancel button not highlighted.

I have an application which makes use of 20 different classes. The program execution starts in mainwindow. I start a progress dialog. I will make use of different classes for different purposes. After each function call which the execution goes to the particular class and does the required and come back to the mainwindow class, I will up...

QWizardPages to keep their own minimum sizes

I'm working with Qt (version 4.6 on Windows XP 32-bit and compiling in Qt Creator 2.0.0) and trying to get a QWizard to work out. First Problem: I have three QWizardPages in my QWizard so far. Each page has a QVBoxLayout applied as it's layout. My first page has very small content (just a three line QLabel) but for some reason there is...

How to get this QTableWidget to display items?

I have a QTableWidget and I can't get anything to show up in it. The following appears in the constructor of the main window: ui->tableWidget->setItem(0,0,new QTableWidgetItem("Item1")); ui->tableWidget->setItem(0,1,new QTableWidgetItem("Item2")); ui->tableWidget->setItem(0,2,new QTableWidgetItem("Item3")); When I run the application...

Polymorphic QSharedPointer

I'm trying to use QSharedPointer in my polymorphic stucture, but I couldn't find right syntax to convert pointer of base class to pointer of derived class. struct Switch : State { int a; }; QSharedPointer <State> myState=QSharedPointer <State>(new Switch); QSharedPointer <Switch> mySwitchTest= ??? myState; What should I put in th...

How do I add a Phonon VideoPlayer to QtDesigner form?

I can add a player object to my UI layout in the MainWindow constructor, but how do I use the widget container as a placeholder so I set properties and layout for the VideoPlayer in QtDesigner? ...

Memory Leak related with replaceChild

Here is source code of my function: bool FieldModel::updateNode(QDomNode &node,const QString &parent){ QDomElement rootOfTag; rootOfTag=fieldState.firstChild().firstChildElement(parent); qDebug()<<"Before"<<fieldState.toString(); QDomNodeList sameTags=rootOfTag.elementsByTagName(node.firstChild().toElement().tagName()); for...

in Qt we uses more pointers, is there any advantages?

Hi, i have some clarification regarding Qt programming. In Qt most of the time we instantiate widget by allocating the memory dynamically. is there any advantages of doing like this from Qt prospective? and what about de-allocation of memory for the widget?. do we need to manually call delete for the allocated memory or Qt handles? E...

What is the best way to sync computer time with an internet time server?

I need to get the current time from one of internet time server in my desktop application. I suppose I need something like a request string and a regular expression to get time from any site that user wants (may be with several predefined sites). Or may be there are some free libraries exist? Thanks. ...

Java Replacement

I may be posting a premature question, and maybe I'm just freaking out for no reason, but the way Oracle is handling Java is not very promising. I am a nerd who fell in love with Java from the first sight... and use it all the time in my personal/freelance projects but now I am thinking of a replacement. I am fluent in C#/VB.NET too but ...

When I derive a class in C++, does it create an object of base class and store it as my member variable in derived class?

Say i create a derived class as below, class CHIProjectData : public QObject { CHIProjectData(QMap<QString,QString> aProjectData, CHIMetaData* apMetaData = 0, QObject* parent = 0); private: QMap<QString,QString> m_strProjectData; CHIAkmMetaData* m_p...

'QObject::QObject' cannot access private member declared in class 'QObject'

class CHIProjectData : public QObject { public: CHIProjectData(); CHIProjectData(QMap<QString,QString> aProjectData, CHIAkmMetaData* apAkmMetaData = 0, QObject* parent = 0); private: QMap <QString,QString> m_strProjectData; CHIAkmMetaData* m_pAkmMetaData; }; CHIProjectData::CHIProjec...

Qt4: Read Default mimeData from QAbstractItemModel

What I want to do is very similar to this. Except that I am working with a QAbstractItemModel that has a tree structure and am interested in more than just the row and column. In fact, in my model, column is always 0. But in order to implement drag and drop, I need to get the parent, children, and the opaque pointer that internalPoint...

QT 4.6: Animating widgets within a QStackedLayout

I am designing a GUI interface in QT Designer. Part of this interface involves two custom widgets stacked on top of each other via a QStackedLayout. When certain actions are performed elsewhere in the GUI, I want the top stacked widget to slide upwards, revealing the widget beneath it and covering whatever happens to be above it. I am c...

How to set Application Icon in QT on WinCE?

Hi all! Please help me with solution of how to set the app icon for exe file on windows mobile platform? It means that icon should displays in explorer, task manager and so on. Thanks in advanse! ...

AttributeError: 'module' object has no attribute 'QtString'

Hi My development eviroment: os: windows xp python: python-3.1.2.msi pyqt: PyQt-Py3.1-gpl-4.7.4-1.exe code: import sys from PyQt4 import QtCore, QtGui app = QtGui.QApplication(sys.argv) s = QtCore.QtString() sys.exit(app.exec_()) It always show me in 'module' s = QtCore.QtString() Attribu...

"Cannot create a win event notifier without a QEventDispatcherWin32"

Qt triggers the exception "Cannot create a win event notifier without a QEventDispatcherWin32" when trying to open a QextSerialPort ...