qt

How to mix Qt, C++ and Obj-C/Cocoa

Hi, I have a pure C++/Qt project on a Mac, but I now find that I need to call a few methods only available in the Cocoa API. Following instructions listed here: http://el-tramo.be/blog/mixing-cocoa-and-qt I have a C++ class implementation in a ".m" file. As a test, my "foo.m" file contains the following code (relevant #include methods...

QTestLib: Undocumented command line argument -chart

In Qt 4.6 QTestLib supports the command-line argument "-chart" (but this is undocumented). A report.html is created, however neither Firefox 3.6 nor IE8 are able to display anything but the headline "Test". When I look into the html-file it has some JavaScript stuff and test results, so there should be something to display. As -chart i...

Closing a QMainWindow on startup?

I have a Qt application that uses a QMainWindow-derived class for the main UI. On startup I want to make some security checks and, if they fail, display a message to the user and close the main window. Currently I make these checks in the QMainWindow constructor, but if I call the close method, nothing happens and the application conti...

Lining up Qt GroupBox labels

Is there an easy way to ensure that controls in different groupboxes on a Qt dialog line up correctly using layouts? If not, is there a way to line them up using code in the dialog's constructor? For example, here is a form with two groupboxes containing controls that are laid out using a grid: Here is how I want it to look: Note...

is Tkinter worth learning?

I generally make my desktop interfaces with Qt, but some recent TK screenshots convince me Tk isn't just ugly motif any more. Additionally Tkinter comes bundled with Python, which makes distribution easier. So is it worth learning or should I stick with Qt? ...

How to Save custom DockWidgets

Hello, I want to save my custom DockWidgets (inherited from QDockWidget) with the saveState() / restoreState() function my MainWindow provides. I have two questions: 1. How can I save and restore my Dockwidgets? - I already tried registering my custom DockWidgets as a QMetaType and implementing the default Constructor, copy Construct...

Mistake in Code.

Hi all. in Qt, i want to customize the listview in QT Symbian. so for the customization purpose i have set delegate for the listview. and i am handling the paint event also.. the problem is the text colour. i am not getting the default text colour, when the item is selected from the listview. i.e below sample code,i have two strings n...

QTWebkit 4.6 and ico images, Rendering problem

Hi I have a local html file which I'm trying to view using QTWebKit, there are some images in the file which are of type ".ico" which seems that QTWebKit is not able to render them as it gives a question mark icon instead. I tried opening the html file in firefox and its working fine and all images gets rendered. My question is, does ...

Showing tooltip of QLineEdit upon focus in Qt

I found that I can set a tooltip on a QLineEdit as such: equation = new QLineEdit(); equation->setToolTip("Example: a*b+c+~c"); However, I would like the tooltip to be displayed when that QLineEdit is focused. How do I do that? Thanks in advance. ...

Customizing QDialog layout at runtime

I have Qt dialogs which need to adjust for a different locale at runtime. The locale is set once at program startup and doesn't change. I need to change both the label text and the ORDER of some text input boxes. eg. Text boxes are day,month,year or month,day,year. Is there a common/simple way to do this? (note - it's not a simple dat...

OAuth library source

Hi, For an application in symbian we need to use the OAuth. I searched in net but I could not get any one. If anyone know about any open source library please let me k now. ...

Connect custom widget to QWidgetTab for sizing

I'm trying to get every widget to scale with change in window size. I have a main window which has a QTabWidget with a QWidget holder for each tab. I then have a custom widget with a seperate .ui file that I set to fill the QWidget space of the tab. The problem is, I can't get the contents of the QWidget to expand, only the tab and QWidg...

Embedding image in QWebView with JavaScript

I am writing a small application with Qt 4.6 (64-bit Arch Linux, though that shouldn't matter) which lets the user edit a document using a QWebView with contentEditable turned on. However, for some reason embedding an image does not work. Here is a code snippet: void LeafEditView::onInsertImage() { // bring up a dialog, ask for an...

Individual QTreeWidgetItem indentation

Is it possible to have individual indentation of items in a QTreeWidget? In specific, I have have a column containing both text, icon and for some of them a CheckBox. The items without a CheckBox gets shifted to the left so the indentation of the icon and the text is not inline with the others. Could maybe be fixed with a hidden CheckBo...

How to hide completely a QGridLayout?

I have a button followed by a QGridLayout full of widgets. I want to show/hide qgridlayout at every button click, but reading documentation of QGridlayout I see there's no show()/hide() implementation, also no setVisible() method available. How do I achieve this? ...

Integrating OGRE 1.7 in Qt

...

QPointer and deleting objects

I've got a QT App that uses QPointers to bring up new UI Dialogs (Widgets). The main app can have numerous of the same widget loaded with different data. The problem I'm having is in deleting and freeing the memory for each widget. If I monitor the RAM usage of the program, each time I click the button to open one of these new widgets, i...

Qt - Moving Frameless window (slow repaint?)

Hy there, I'm new to Qt and i tried to create a Frameless window, which is dragable. The Problem is, if i move the window.. there are are thousands of (it? sorry, don't know how to describe it in english) until i stop. Is there a way to fix this, or am i thinking the wrong way? MyWindow.h #include <QMainWindow> #include <QLabel> #incl...

Is there a good source for 3rd party QT GUI controls?

I have tried to find them through Google but haven't had much luck. I know the number of 3rd party controls is not as big as .NET or Java, but surely there are some out there better than what comes with the library? ...

Memory management for collections of widgets in Qt

Sorry for the dumb question, but I'm working with Qt and C++ for the first time, and working through the tutorial and some samples. One thing that was mentioned was that Qt stuff doesn't need to be explicitly deleted. So, main question, does this also apply to collections of Qt stuff? Like say I want a dynamic number of MyWidgets, so I ...