qt

changing the layout of a tab

i am creating a application in which i need to change the layout of my current tab when a radio button is pressed but i am not getting how to do it. can any one tell me the right way? I am using the following code to change layout. changed_layout=new QVBoxLayout; label1=new QLabel(string); delete main_layout; changed_layout->addWidget...

Deselecting radio buttons

I am creating an application in which i use different group box for different categories which contains radio buttons for items.But if i select an item from one group box and then from another group box,the item in previous group box remains checked. But i want that whenever i select an item from different group box all other item must g...

Bring a window to the front in Maemo

I've got a Maemo (Qt) app that does some integration with the built-in media player via D-Bus. All the control functionality I need is complete, but I've got a requirement to show my application window (which gets backgrounded when playback starts) instead of the media player when the playback window is closed (it's a stacked window). I...

QSortFilterProxyModel returning artificial row

I'm using a QSortFilterProxyModel to filter results from a QAbstractListModel. However, I'd like to return a first entry which is not present in the original model, that is, it's somehow artificial. This is what I have so far: class ActivedAccountModel(QSortFilterProxyModel): ...

How to convert a string representing decimal number in exponential form to float in Qt?

I have some decimal numbers in a text file represented in exponential form Eg: 144.2e-3. I want to store the values in float. In qt it returns "0" when i directly use the "number.toFloat()" method. Please help. ...

Best approach for building a dynamic widget perspective using QT ?

I am building an interface similar in features to the Eclipse IDE for a telemetry project. I'll be showing many different widgets and each of them needs to be resizable / moveable / popped_out / popped_in / hideable / "fullscreen-able" / etc... like a "perspective" of the Eclipse IDE. What would be the best approach using QT? Which clas...

Getting Started with PyQt

I'm testing out some of the examples in Rapid GUI Programming with Python and Qt, but running into a stumbling block here or where. When I copied to following exercise (verbatim, from the book): import sys import time from PyQt4.QtCore import * from PyQt4.QtGui import * app = QApplication(sys.argv) try: due = QTime.currentTime() ...

Qt4: Write a function that creates a dialog and returns the choice of the user.

Not sure if this has a straightforward solution, but I want to write a function that shows a dialog (defined elsewhere in a class that inherits QDialog) and returns the user input when the user has finished interacting with the dialog. In other words, something similar to the QFileDialog::getOpenFileName static method, where a single lin...

QJSON using in Mac - getting some issues

Hi, I am using the QJson for parsing. But I am stuck up with some issues. I have used the following code. void CityBook ::getCityList(QUrl url) { //!connect(cityReply, SIGNAL(readyRead()),this, SLOT(httpReadyRead())); cityGuideNetworkAccessManager = new QNetworkAccessManager(this); connect(cityGuideNetw...

qt window menu bar

in any window (gui ) there appears a menubar and minimize, maximize and close icons. How is it possible to hide this bar. Brgds, kNish ...

Removing duplicates from a QList

For years I have been using the following pattern to remove duplicates from an object of the C++ std::vector type: std::vector<int> cont; std::sort(cont.begin(), cont.end()); cont.erase(std::unique(cont.begin(), cont.end()), cont.end()); Now I am wondering if the same paradigm is the one to be used with the Qt QList<> class, or if the...

Error passing custom Object from QtScript to C++

Hello, I have written a custom class which is available in QtScript through a Prototype. Also another global class is available which should be used to print the custom class generated in QtScript. This is my custom class (very simple ;) ): class Message { public: int source; int target; }; This is the prototype I...

CutyCapt - unable to capture non-latin chars

Hello, i have install Qt44.* which includes libWebKit in order to compile and make the Cutycapt script/app as described at the project homepage (http://cutycapt.sourceforge.net/) The script runs but it is unable to capture non-latin fonts (e.g. Greek). When doing a screen capture for websites with latin characters everything works. The...

What language to use for text editor?

This is sort of a strange question, but oh well. I feel like writing a (rich) text editor mainly to be used for note-taking, in either C or C++, using most probably GTK or Qt for the UI. The problem is that I can't really decide what to use. I know both C and C++, C a little better. I've never used Qt but I'm completely fine with learn...

How to disable symbol loading when debugging a Visual C++ program?

I am using Visual Studio 2008. I don't need to debug some DLLs in my project, so can I disable symbol loading when debugging a Visual C++ program? Does it help to make startup time faster when debugging? The symbols are all local, so I don't have those slow loading problem, just want to make debugging faster and faster. For example I a...

How to solve "cannot open shared object" problem while opening subprocess within apache

I run a web application in apache. My application try to execute a executable written by QT. But I always encounter "cannot open shared object libQtWebkit.so: No such file or directory" error. I can run this executable in shell without any problem. I tried set LD_LIBRARY_PATH but still not working. How can I set shared library path ...

objectCast Sideways casting

I'm trying to replace all dynamicCasts in my code with QT's objectCast. But I've run into a bit of a snag. Here's the hierarchy of my objects: class ABase : public QObject class IAbility; // Registered as Qt Interface class ISize; // Registered as Qt Interface class Derived : public ABase, public IAbility, public ISize; // Uses Q_INTE...

How to make smart installer for ovi applications

Hi, How to make smart installer for Ovi applications? ...

Problem with random number generation And displaying with QPainter

In my QT application,I am generating some random numbers and displaying them on main widget,but the problem is when i maximize or resize the windows,random numbers get changed automatically. for displaying numbers on widget,i am using paintEvent. Can anyone tell me that how to create a seperate widget in main widget for playing animation...

How do you add items to the QT QListView

I am creating a mysql reading program and I need to use a QListView with colunms and rows, but I can't work out how. ...