Hello, I've got a QT problem.
I want to make my program stop at place where I define, let`s say for 3 seconds. I couldn't manage to do that. I need that because earler my program generates file and it is used by a program which I call a bit later. Problem is, that file doesn't seem have enough time to create. My code looks like this:
vo...
Hi,
I'm trying to find the top-level widget on a non-active window. But I do not want to use QApplication::topLevelAt() method.
I have a main window and several child widget's of main window's central widget. Is it possible to distinguish whether one of the child widget is on top of other childs?
Sami
...
Hi,
I have a QComboBox that I fill with QStrings using:
comboBox->addItem(someString);
When I start my GUI application the width of the comboBox is always 70, even if the smallest item is much larger. How can I dynamically set the width of a QComboBox, for instance, to the largest QString within the comboBox?
Thanks!
Edit:
After so...
I have set the WA_DeleteOnClose widget attribute in a MainWindow.
setAttribute(Qt::WA_DeleteOnClose);
However, whenever I close that main window, I get a segfault in its destructor, which only has delete ui;
In a nutshell, created a Qt4 GUI Application in Creator, added the setAttribute(Qt::WA_DeleteOnClose); to constructor, program ...
I am about to read data From a File which has stored it's time in nanoseconds from 1/1/1970. My problem is I want to read it to a QDateTime object, but it simply does not work as I want it to and the Qt Documentation did not help me either.
Note: milliseconds raster is enough for my purposes
Here my current approach:
void setDateTime(q...
I'm looking to make a QToolBar with a few actions in it, each of which is "checkable" (that is, I call setCheckable(true) on each action after creating it, which leaves the button in the down state after clicking it).
The only way I can think of "unchecking" the other buttons is to hook into each button's triggered signal and uncheck th...
Greetings all,
Does simply subclassing QGLWidget and reimplementing paintEvent() make use of OpenGL and hardware acceleration?
I create a QPainter and draw QImages in this paintEvent().
What happen inside the paintEvent() method of QGLWidget? Does it convert the images(QImage,QPixmap) into OpenGL textures?
Does it use hardware acceler...
I'd like to be able to choose which oci.dll the Qt plugin is using, the Qt documentation states:
When you run your application you will
also need to add the oci.dll path to
your PATH environment variable: set
PATH=%PATH%;c:\oracle\bin
Is there another way than changing the PATH?
...
Hi,
I am using Qt 4.5 and having Qt Creator as the IDE. I am quite comfortable with it. I know we can open the .pro files (from the Qt Creator) in the Visual Studio IDE. But how about the reverse? i.e How can I open a visual studio Qt solution (.sln) in Qt Creator? Is it possible or I have to create a pro file again for the project?
T...
http://img804.imageshack.us/img804/4258/uisketch.png
Hello, I am trying to a make a UI, like in the sketch picture (spam prevention made me to post only the link). What should be the boxes type? QListView (boxes should be scrollable)? I have tried that, but I couldn`t manage to add any action to "available actions". I have tried to play...
Hello,
I'm new to QT. I'm using PyQT for GUI development in my project. I want to achieve this layout in my application. This application searches images from an image database. Google image search layout is ideal for my purpose.
I'm following the book "Rapid GUI Programming with Python and Qt" and I'm familiar with layouts. I guess...
I am using QGraphicsScene/QGraphicsView pair in my application.
I had subclassed them for my purpose. The code snippet that generate the pair is below:
itsScene = new QGraphicsScene;
itsView = new QGraphicsView;
itsView->setParent(itsCanvas);
itsView->setGeometry(20,20,1700,720);
itsView->setBackgroundBrush(Qt::black);
itsView->setAlig...
The case is as follows:
You have a main window (ui1) that is to contain two other UIs (ui2 and ui3). Neither ui2 nor ui3 care about any other uis. They only have slots to react to, and they might emit signals as well. See drawing below.
+----------------------------+
| +------+ +------+ |
| | | | | |
| | ...
Hi!
How can I set an app icon in QT on Symbian? I read here http://doc.qt.nokia.com/4.6/appicon.html about hot to set it but it doesn't work for me. I created SVG-Tiny icon(file) and wrote ICON = Resource/ico.svg in the pro file. What is wrong?
Thanks in advance
...
Greetings all,
I have a code snippet as follows :
class AppCtx {
private:
QMap<QString,IRzPlugin*> pluginsMap;
public :
void addPlugin(IRzPlugin *plugin)
{
pluginsMap.insert(plugin->getPluginUID(),plugin);
}
QMap<QString,IRzPlugin*> & getPlugins()
{
return pluginsMap;
}
}
In my client code I access the QMap as follows....
when i use CreateFile function like below ...it gives me valid handle
HANDLE hDevice = CreateFile (TEXT("\\\\.\\G:"),
0,FILE_SHARE_READ | FILE_SHARE_WRITE, // share mode
NULL, OPEN_EXISTING, 0, NULL);
if( hDevice == INVALID_HANDLE_VALUE )
{
qDebug()<<"In valid handle";
}
else
{
qDebug()<<"valid han...
How can i convet QString to LPCWSTR...
QString a = QString("\\.\%1:").arg( "G" );
i have to use it for the below function
HANDLE hDevice = CreateFile ( a ,0,FILE_SHARE_READ | FILE_SHARE_WRITE, // share mode
// NULL, OPEN_EXISTING, 0, NULL);
Thank you
...
Hi guys .. I basically have multiple events signals which I want to connect to the same slot. What I want to know is how can I pass string based paramters to that same slot so that the slot knows which is this signal coming from. One alternative is to make as many slots as there are signals and then connect them in a 1:1 manner, but this...
i got this thread.h file;
#ifndef THREAD_H
#define THREAD_H
#include <QtGui>
#include <QString>
#include <tray.h>
class svThread : public QThread {
public:
bool getIsPaused();
void checkSettings();
virtual void run();
void setPause(bool);
signals:
void mySignal(bool);
};
#endif // THREAD_H...
Hi all .... I'm using a QListPickSelector in my project and the idea is that it displays a set of images, rather than a list of strings .. Now I have tried using the setIcon() function, which works, but the image displayed is very tiny .. !
Here is the output I get when I use the setIcon() function:
As you can see, the image displaye...