Hi all,
I've got some Asynchronous cleanup activity I need to do as my Qt application is shutting down.
My current approach is to trap the aboutToQuit signal. I launch my Asynchronous behavior, and then the application shuts down. Is there any way to block Qt from shutting down until my asynchronous behavior is complete?
This works on...
I have often wanted to use QTextEdit as a quick means of displaying what is being written
to a stream. That is, rather than writing to QTextStream out(stdout), I want
to do something like:
QTextEdit qte;
QTextStream out(qte);
I could do something similar if I emit a signal after writing to a QTextStream
attached to a QString....
I've created a dock widget which contains a QTreeView. The size of the tree view remains static when the dock is resized. How can I get it to change it's size automatically to fill the dock area?
I've created the dock widget using the designer and use multiple inheritance to include it in the main app.
Inherited class:
class TreePaneW...
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...
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...
Hey All,
I am trying to connect QWebpage::windowCloseRequested() to a slot that just prints out a debug message. When I call window.close(); in JavaScript it doesn't bubble the signal up or call the slot...
connect(webView->page(), SIGNAL(windowCloseRequested()),this, SLOT(windowCloseRequested()));
The slot is setup, it is in my wind...
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...
hello all,
i have to populate a QTreeWidget with items (or children of items) that may happen to be too long to fit in a single line, so i'm looking for a way to word wrap them.
i thought
myQTreeWidget.setWordWrap(True)
(done via QtDesigner4) would have done the job, but that doesn't seem to be the case.
i don't konw if it is relev...
I'm writing a little GUI utility in Qt4 which uses a QGraphicsScene. One of the items tracks the mouse in the horizontal plane as you move it around, and holding down a modifier key allows you to change the item's rotation. When rotating items I'd like the mouse cursor to change to a curvy arrow (or something) and lock visually in plac...
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?
...
What is the best way to present a clickable URL in a QTableView (or QTreeView, QListView, etc...)
Given a QStandardItemModel where some of the columns contain text with URLs I'd like them to become clickable and then handle the click by using QDesktopServices::openURL()
I was hoping there would be some easy way to leverage QLabel's tex...
I have a QTableView that I need to get the selectionChanged event from. I can't seem to get the connect working. I have:
MyWidget.h
...
protected slots:
void slotLoadTransaction(const QItemSelection & selected, const QItemSelection & deselected);
private:
QTableView table;
...
MyWidget.cpp
...
connect(
table->selectionModel()...
Hi,
I have a background thread and the thread calls some methods that update the UI (in order to show progress bars and show additional info in text areas).
If I modify some UI widget values, a "Cannot send events to objects owned by a different thread" assertion error is raised.
Looking at forums, I read that I could use QMetaObject:...
Hi.
I'm writing a windows application using Qt (4.6.1) that uses QProcess class to execute a java application.
Here's basically the code:
process = new QProcess(this);
connect( process, SIGNAL( started() ), this, SLOT( onProcessStarts() ) );
connect( process, SIGNAL( finished(int) ), this, SLOT( onProcessE...
At work, I was told to configure and build Qt 4.6 with the cocoa flag
./configure -cocoa
Instead I just ran configure without any flags on my Mac OS X 10.6 machine.
Does that mean I have to reconfigure or is cocoa linked by default in Snow Leopard?
Alternatively, how can I check if my Qt build is linked against cocoa?
...
I'm just getting started with Qt programming, and I'm trying to make a simple tabular data layout using a QTableView control with a model class of my own creation inheriting from QAbstractTableModel. For some reason, my table view ends up looking like this:
What in the heck are those things that look like checkboxes (but don't do anyt...
First off, I'm using the Qt 4 libraries and C++.
Is there a way to be notified (signal, event, ?) when a property (dynamic or otherwise) changes on a QObject?
I can't modify the QObject class as it is part of the Qt4 library. More info about QObject here.
...
What is the difference in the following code,
QGraphicsScene * scence = new QGraphicsScene();
QBrush *brush = new QBrush((QColor(60,20,20)));
scence->setBackgroundBrush(*brush);
QGraphicsView *view = new QGraphicsView();
view->setScene(scence);
//view->setBackgroundBrush(*brush);
//view->setCacheMode(QGraphicsView:...
Hello all,
If i apply a property to a parent widget it is automatically applied for child widgets too.. Is there any way of preventing this?? For example if i set background color as white in a dialog the button,combo boxes and scroll bars looks white as it lacks it native look(have to say it's unpleasant & ugly).. Is there any way that...