I have a UI and a QGraphicsScene subclass GraphicsScene that implements mousePressEvent(), however mouse clicks are being ignored.
ui->setupUi(this);
scene = new GraphicsScene(this);
scene->addPixmap(QPixmap::fromImage(someImage));
ui->graphicsView->setScene(scene);
connect(scene, SIGNAL(clicked(QPoint)), this, SLOT(someSlot(QPoint)));
...
I'm trying to display a little square of solid color.
I've created a QGraphicsView widget myGraphicsView and call:
ui->myGraphicsView->setBackgroundBrush(QBrush(Qt::red, Qt::SolidPattern));
But it stays white. What am I doing wrong?
...
I'm trying to build a project on Mac OSX, and it's giving me a cryptic error:
"[moc_droparea.cpp] Error 1"
droparea.cpp is (obviously) a file in the project. I checked that it exists in the project directory and is not corrupted. The file moc_droparea.cpp doesn't show up in the build folder after this error, so I'm assuming it's failin...
When I use qtcreator on mac, it creates universal binaries.
Does anyone know how to set it so it just creates a 'native' binary? (So i386' in my case?)
Qtcreator uses qmake as a buildsystem.
Google hasn't been my friend so far, I hope stackoverflow will.
EDIT:
my config file so far:
TARGET = mongowriter
CONFIG += console
CONFIG ...
Hello,
I have a form and several widgets on it. Say, I have the following code and breakpoint on this line:
ui->labTitle->setMinimumHeight(64);
And I would like to know which height the labTitle has now. Where and how??? If I try to add ui->labTitle into watches list it says it doesn't know what is it. Maybe I need to adjust some debu...
I have some questions about Qt creator.
Under Win XP, I can use autocomplete with hot key 'ctrl + whitespace'. Can I change the hot key to another like 'ctrl + shift + u' ? Because the hot key 'ctrl + whitespace' often is used to change my input method.
And under Mac OS X, I installed Qt 4.7 with Qt Creator too. But I cannot find a hot...
I am trying to do console application to read pixels from image:
#include <QtCore/QCoreApplication>
#include <QtGui/QImage>
#include <iostream>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QImage *img = new QImage("adadad.jpg");
//std::cout << "Type filename:" << std::endl;
img->isNull();
ret...
Hi,
I am tryimng to make a UI. But in qt, the window size is too short, I want to work in a separate windows like photoshop. Here I am posting the picture. I want to see the middle window(i rounded it by rose color) in full screen size. Can anybody help me?
EDIT:
If I want to create a full screen application, How can I positio...
I am drop some QLabel on main form my qt gui app, and after that in my main class "mainwindow" I cant reach label? Why and how to solve it? (I am trying to type label - its name and there isn't any.)
...
I want to display data in multiple columns in a QColumnView. I am using Qt Creator and Qt 4 for development.
Consider an address book application where you have multiple groups: Group 1, Group 2, etc. Your contacts can belong to any of those groups.
Group 1:
John Smith
Pocahontas
Group 2:
Chief Powhatan
Group 3:
...
W...
In Eclipse there is an option to specify pre processing defines (#ifdef macros) to a project by using the Symbols option in Paths and Symbols. This helps in effective indexing of code which is cross platform. Is there any option to provide these in Qt creator?
...
I can't figure out how I can move a slider handle of a QSlider in QT. When I press for example A( I want to move coursor left) and D(I want move coursor right) so I did
(void) new QShortcut(Qt::Key_A, this, SLOT(moveTickmarkLeft()));
(void) new QShortcut(Qt::Key_D, this, SLOT(moveTickmarkRight()));
implementation:
void LCDRange::...
Is there a way to get a resize effect between two widgets? Like say I have two QTextEdit boxes next to eachother, I want to get a handle between them so I can move it back and forth. Sort of in the same way that the textarea I'm writing in now has a handle at the bottom for making it larger.
I'm using QT Creator and I can't seem to figu...
I'm new to Qt but no problem in the C++. I used Qt Creator and made a simple program with a button (like a hello world) then I built the project. I was not able to run the executable file in windows itself (outside the creator) because it needed these DLL files:
libgcc_s_dw2-1.dll
mingwm10.dll
QtGuid4.dll
QtCored4.dll
I found these fi...
I download the qt framework and debugging helper, I can debug my source with Qt creator, but I can't step in to the Qt source code, I have download the source of Qt, how to config the source to let me can trace into the source? or, Must I compile the library from source to do this?
I can trace into Qt source Under Windows using Visual c...
I'm trying to make an UI that contains a list of such items:
User can change the count of the items, so the UI is dynamic.
What are the best components to get user input, like in the picture? Is it multiple QLabels and QLineEdits?
What is the best way to manage them?
...
I use the following code to get GeoLocation for my app
QGeoPositionInfoSource *source = QGeoPositionInfoSource::createDefaultSource(this);
if (source) {
source->setUpdateInterval(1000); // time in milliseconds
source->setPreferredPositioningMethods(QGeoPositionInfoSource::AllPositioningMethods);
connect(source, SIGNAL(positi...
Hi,
I'm considering using QT Eclipse integration (Helios-CDT/Windows) instead of QT Creator.
One of the must-have features is an automatic synchronization of .pro file with project contents (sources and headers). It's nice it's already there (The "Add files to QT Project" dialog on resource addition/removal).
The problem is - this featu...
Is there a stylesheet available for use in Qt applications (through Qt Creator) that makes your GUI use the stylesheet you see in Qt Creator itself, as well as in AutoCAD and some other applications?
What is the name of that stylesheet or where can I get it? It looks much like the Vista stylesheet though...
And whenever you set a custo...
I'm having some questions about Qt's stylesheet functionality. It's really great, but it feels like the feature isn't around for too long yet, true? It's by far the easiest way to style my GUI though.
Is it possible to add color fading in the stylesheets? Whenever the mouse hovers over a certain widget, I don't want it abruptly changin...