Let's say that my QStateMachine have a structure depicted below:
Note: actionsHistory is QHistoryState with initializeActions set as default state.
The transitions flow go like this:
actions
actionsHistory
initializeActions (default state for actionsHistory)
doActions
interrupt (after QEvent::User)
actions
actionsHistory
doActions ...
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:...
Hi all,
I'm wanting to implement a scroll bar that snaps to particular values (like windows can snap to the edge of a screen). The idea is that as I drag the scrollbar down it snaps the bar to values as it approaches them.
My scenario is displaying 3 chapters of text. I would like to be able to snap to the beginning or end of a chapter...
I'm trying to modify the fridge magnets example by adding a button that will reload the widget where the draggable labels are drawn, reflecting any changes made to the text file it reads. I defined another class that would contain the button and the DragWidget object, so there would be an instance of this class instead of DragWidget in m...
Hello,
I'm teaching my self Qt; in the same time I don't want to lose my Java skills in Qt.
I stacked in some codes to do it in Qt, I tried many times as well as search in the net.
Code # 1
Object[] names = jList1.getSelectedValues();
String msg = "";
for (Object o : names)
msg += o;
Code # 2
DefaultListModel model;
model = new Def...
I am trying to build Marble on Windows (XP) and have been extremely unsuccessful.
Following the instructions written here. I am wanting to build it as QT only.
Configuration of the build tree fails. I am using the cmake-gui since I have never tried to compile using cmake it's possible it could be something in there.
I found a similar i...
Hi Geeks,
I downloaded the qt embedded demo source code recently on my linux machine. Following are the outcomes during running of the program
I compiled it statically on my x86 machine and run the application on x86 machine it runs fine. But when i took the statically compiled binary file to other machine with Atom platform It run wi...
I'm new to QT, and am trying to figure out the best means of creating a WYSIWYG editor widget for a custom markup language that displays simple text, images, and links. I need to be able to propagate changes from the WYSIWYG editor to the custom markup representation.
As a concrete example of the problem domain, imagine that the custom...
Hello All,
I want to read list of applications from the Applications folder on Mac using Qt or Carbon.
I am not sure how to do this. So any pointers will be appreciated.
Thanks
Rahul
...
Hi,
when i add the widget to the main window, by default the action menu item will be present,
how to remove that?
menuBar()->setVisible(false);
verAction = new QAction(tr("&Version"),this);
menuBar()->addAction(verAction);
connect(verAction, SIGNAL(triggered()),this, SLOT(displayVersion()));
displayAction = new QAction(tr("&Display"...
Hi,
Am new in Qt Programming and i would like to develop a program which i want to run in Windows, Linux(ubuntu), and Mac.
I heard that Qt support mutli-platform application development,
but my Question is that,
would any Qt library need to run these appilication in Ubuntu after i depolyed or compiled. Or
...
Hi,
I am new to Qt I created my first form and I want to look this on My mobile how can I, I mean how can i run this or create sis file for this that I can look this on my mobile..
Thanks
...
I store objects of a custom data type in QStandardListItems. I recover these objects by calling:
i.data(Qt::UserRole + 1).value<LiteReach>();
This only creates a new object in the stack. Any changes I do to them would be temporary.
Is there a way to get the base object stored in itemData so that it could be manipulated directly?
If n...
Hi,
I want to start working on a personal project and I want to make it cross-platform. All of my Linux work was done for business customers, so the target distro was specified in advance, but this is different.
The project will be open source and use Qt. Here's what I'm wondering:
Is it enough if I do my dev + testing on one distro...
I noticed that the sample apps from QT show their menu bar as opaque, and with a color that doesn't match any of the styling on the window. It seems as if the windows being created by QT when running on Vista or Windows 7 don't pick up the translucency that are no the mainstay of the new Windows look and feel. Is there a way to override ...
I am attempting to write a cross-platform GUI application that would be deployed to Windows, Mac OS X, and Linux. My requirements are:
Single code base for all three deployment platforms, without a large amount of conditional logic for handling differences between platforms.
Looks as close to "native" as possible on all three platform...
Hi, quick question. Is there any way to (easily) retrieve the parent layout of a widget in Qt?
PS: QObject::parent() won't work, for logical reasons.
EDIT:
I'm positive the widget has a parent layout, because I added it to a layout earlier in the code. Now, I have many other layouts in the window and while it is possible for me to keep...
The code
#include <QtCore>
#include <QtXml/QDomElement>
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
QDomElement* element = new QDomElement();
element->setTagName("feature");
qDebug() << element->tagName();
return app.exec();
}
prints simply "". However, as far as I can tell from the docu...
Probabaly a newbie question here. Is there a way for the user to drag resize QTableWidget? My QTableWidget is nested inside a tab widget, therefore it is not a window by itself.
I tried implementing a QSizeGrip, but when I drag resize the grip the entire window resizes and not just the table.
...
I am using Qt 4.5 and a qgraphicsscene/view to show video to the user.
I would like to provide a "take a snapshop" button and I am sure that there is a pretty straightforward way much simpler of everything I am thinking about.
How can I do this elegantly?
BTW, the code is here :
http://gitorious.org/handy
...