qt4

Setting Tab Order for QTableView in Qt 4.4

Hi, I am having a QTableView that has data loaded with a QStandardItemModel in the form Parameter Value X1 0.456 X2 0.123 .... and so on. Now i have to set the Tab Order property in such a way that i can traverse only through the values and not the parameters. i.e when the control is on 0.456 and if i press '...

QT How to remove the action menu item

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"...

slot function not getting called

I am learning QT and trying out some examples. I am trying to make a dialog that disappears a label when a button is pressed and makes it appear when the same button is pressed again. Below is the code. #include <QApplication> #include <QPushButton> #include <QLabel> #include <QDialog> #include <QObject> #include <QHBoxLayout> int ma...

Can a QT window be completely styled, including the menu bar when running on Windows 7 or Vista?

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 ...

QT 2d list causing segfault

Hi everyone, I've got a program that worked until recently. The offending code is shown here: void writeTimeInfo(fitsfile *fptr, QList<QList<double> > &in) { double data[in.size() * in[0].size()]; long naxes[2]; int status = 0; naxes[1] = in.size(); naxes[0] = in[0].size(); for (int i=0; i<naxes[1]; i++) { for (int j=0; j<n...

Could not send backspace key using ::SendInput() to wordpad application

I have used sendinput() function and windows keyboard hooks to develop a custom keyboard for indian languages. Project is in google code here: http://code.google.com/p/ekalappai The keyboad hook and sendinput functions are placed in a win32 dll. And they are called from a Qt exe. Our application works fine for most keys and application...

Qt switching between views?

How to switch between the two screens in Qt? for example, i have a button,static text plus a toolbar,now i will add it to a frame and set it as central widget it works well for one window.. what if i move to the next widow? there i need to show some other stuffs like some other button, images etc... and what if i come back to the first...

Using Freetype2 in QT (QPixmap)

What should I do to to render sample string with specified font to the QPixmap? QT still cannot working with Type1 font, but it is required. My code: int e; e = FT_Init_FreeType(&library); e = FT_New_Face( library, "arial.ttf", 0, &face ); e = FT_Set_Char_Size( face, size << 6, size << 6, 96, 96 ); e = FT_Set_Pixel_S...

how to run QT from command line in windows

hi all, i installed Qt4 and Qt creator. now i need to know how can i run an application with in command line. I installed QT and QT creator. If i need to create a project i need to open the Qt Creator and create new project and write the code there, compile/build with the QT creator. Is that the procedure in QT. So in this case am not a...

How to convert .ui(user interface) files into .exe file in QT

I am a fresher in qt,i don't have much knowledge on qt, but i created some of file in qt for my application (regaurding to GUI format).I was created some .ui files in qt,but i wanted these files into .exe format.I think u had unerstand my problem,so please help me ...

Qt::X11BypassWindowManagerHint functionality on Windows

Hi I'm currently developing a cross-plataform virtual keyboard. In linux i was able to do whatever i want, but in Windows i'm having problems to prevent the widget to obtain the keyboard focus. In linux, using the window flag Qt::X11BypassWindowManagerHint the widget never gets the keyboard input, but of course, that flag does not ...

pdf viewer for pyqt4 application?

Hi all, I'm writing a Python+Qt4 application that would ideally need to pop up a window every once in a while, to display pdf documents and allow very basic operations, namely scrolling through the different pages and printing the document. I've found the reportLab to create pdf files, but nothing about pdf viewers. Does anyone knows a...

how to add lines numbers to : QTextEdit ?

i am writing a visual basic ide , and i need to add lines numbers to QTextEdit and highlight current line . i have found this tutorial but it is written in java and i write my project in c++ so where to find tutorial like that in c++ , or if there is a ready to use component ? thanks . ...

How does void QTableWidget::setItemPrototype ( const QTableWidgetItem * item ) clones objects?

QTableWidget::setItemPrototype says following. "The table widget will use the item prototype clone function when it needs to create a new table item. For example when the user is editing in an empty cell. This is useful when you have a QTableWidgetItem subclass and want to make sure that QTableWidget creates instances of your subclass."...

text is exceeding the listview bounds in Qt

Hi. I need to customize the listview,I am placing an icon and a text at the center of the listview. If the text length is bigger then the list rectangle length.. the text is coming over the icon first letter of the string is not visible.. How to avoid this situation? Is it possible to give marique effect for the string? Thanks in adv...

QGraphicsView and eventFilter

Hello everyone, This has been bugging me for more than two days now, so i thought i should ask. I am using Qt 4.5.3 (compiled with VC2008) on Win7. I have MyGraphicsView (inherits QGraphicsView) and MyFilter (inherits QObject) classes. When i install the MyFilter object as an event filter to MyGraphicsView, Mouse events are delivered ...

Calculix Data Visualiser using QT,zooming

how could i zoom-in and zoom-out the output image.it should be user friendly,means using push button.Please send me a code for that. ...

Architecture for Qt SIGNAL with subclass-specific, templated argument type

I am developing a scientific data acquisition application using Qt. Since I'm not a deep expert in Qt, I'd like some architecture advise from the community on the following problem: The application supports several hardware acquisition interfaces but I would like to provide an common API on top of those interfaces. Each interface has a...

Qt4: QMenuBar/QMenu doesn't show up on Mac OS X

Hello, I'm having difficulties to make a QMenuBar display a QMenu with a QAction under Mac OS X (Snow Leopard). Here is the code I'm using for creating the menu: void ClientWindow::setUpMenu () { QMenu * file = menuBar()->addMenu("&File"); QAction * quit = new QAction("&Quit", this); file->addAction(quit); connect(quit, S...

Keep widget on top in Qt

I'm creating an application which has a "floating" widget which can be dragged around inside the application window. But it starts up, or tends to go behind other widgets sometimes. Is there any way to make sure that the widget in my application stays on top of all other widgets whenever it is made visible? Thanks. ...