qt4.6

How to trigger the edit mode of an item in a QTableView?

这一生的挚爱 提交于 2019-12-10 03:34:33
问题 I'm using QTableView and QStandardItemModel now. In the QTableView, if you double-click a cell, this cell will get into edit mode and you can edit its content. Now I have a problem, I want to trigger the edit mode of an item by code (by command), what should I do? I cannot find proper function or slot in QTableView or QStandardItemModel. Do I need to emit any signal to get into edit mode? And which signal I should catch if I want to know when the editing is finish (user press "Enter" or click

How to trigger the edit mode of an item in a QTableView?

≡放荡痞女 提交于 2019-12-05 04:35:36
I'm using QTableView and QStandardItemModel now. In the QTableView, if you double-click a cell, this cell will get into edit mode and you can edit its content. Now I have a problem, I want to trigger the edit mode of an item by code (by command), what should I do? I cannot find proper function or slot in QTableView or QStandardItemModel. Do I need to emit any signal to get into edit mode? And which signal I should catch if I want to know when the editing is finish (user press "Enter" or click another items to leave the edit mode)?? Thanks for your help See : void QAbstractItemView::edit (

Where to control the QWizard button?

冷暖自知 提交于 2019-12-04 02:46:51
I'm using Qt, and I use a QWizard object which contains several pages. when it comes to a specific page, I want to hide the "Next" button first, and shows it after the user do something (such as clicking on a radiobutton...) I want to do some customize control of the wizard when this specific page shows up. the question is, I know how to hide the button, but I don't know which function I should use. I tried the QWizardPage constructor, the initializePage function, the "show" function, but all of these function didn't work. If I put the button control in the wizard page constructor, the program

How to make keyword to work instantly with no delay in Qt::4.6 (C++)?

一笑奈何 提交于 2019-12-02 13:35:18
问题 OS:: win xp sp3. Qt:: 4.6 I have class Gameboard in which i have some rectangle.I defined keyPressEvent for that rectangle in order to move him around the screen.Key_A :: rectangle.moveToLeft & Key_D :: rectangle.moveToRight.Problem is that keys work with delay. When i release one key and press another one it takes some time before that one begin to work.I checked Qt online documentation and now for that effect but dont now how to make those keys to work instantly without delay beetween them?

How to make keyword to work instantly with no delay in Qt::4.6 (C++)?

痴心易碎 提交于 2019-12-02 07:27:30
OS:: win xp sp3. Qt:: 4.6 I have class Gameboard in which i have some rectangle.I defined keyPressEvent for that rectangle in order to move him around the screen.Key_A :: rectangle.moveToLeft & Key_D :: rectangle.moveToRight.Problem is that keys work with delay. When i release one key and press another one it takes some time before that one begin to work.I checked Qt online documentation and now for that effect but dont now how to make those keys to work instantly without delay beetween them? code snippet: //in Gameboard class ship = new QRect(x,y,w,h); void Gameboard::keyPressEvent(QKeyEvent*

Hook key & key combinations from keyboard with Qt 4.6

跟風遠走 提交于 2019-11-28 08:50:35
Let's say I have a window-less application which has only an icon on the Taskbar (Windows, Mac OS X & Linux). I want it to capture some key & key combinations, let's say Right Control + Right Shift. Upon keying in correct, combination, it will do something, say take screenshot. I can do window-less app, icon on the Taskbar and screen capture but I don't know how to monitor keyboard globally for key combinations. Please kindly advise. Any help or hint is greatly appreciated! Thanks in advance! przemoc System-wide key grabbing is a tricky subject, but system-wide key hooking is even trickier.

Hook key & key combinations from keyboard with Qt 4.6

六眼飞鱼酱① 提交于 2019-11-27 02:28:01
问题 Let's say I have a window-less application which has only an icon on the Taskbar (Windows, Mac OS X & Linux). I want it to capture some key & key combinations, let's say Right Control + Right Shift. Upon keying in correct, combination, it will do something, say take screenshot. I can do window-less app, icon on the Taskbar and screen capture but I don't know how to monitor keyboard globally for key combinations. Please kindly advise. Any help or hint is greatly appreciated! Thanks in advance!

QCompleter Custom Completion Rules

假如想象 提交于 2019-11-26 18:49:47
I'm using Qt4.6 and I have a QComboBox with a QCompleter in it. The usual functionality is to provide completion hints (these can be in a dropdown rather than inline - which is my usage) based on a prefix. For example, given chicken soup chilli peppers grilled chicken entering ch would match chicken soup and chilli peppers but not grilled chicken . What I want is to be able to enter ch and match all of them or, more specifically, chicken and match chicken soup and grilled chicken . I also want to be able to assign a tag like chs to chicken soup to produce another match which is not just on the

QCompleter Custom Completion Rules

假装没事ソ 提交于 2019-11-26 06:37:57
问题 I\'m using Qt4.6 and I have a QComboBox with a QCompleter in it. The usual functionality is to provide completion hints (these can be in a dropdown rather than inline - which is my usage) based on a prefix. For example, given chicken soup chilli peppers grilled chicken entering ch would match chicken soup and chilli peppers but not grilled chicken . What I want is to be able to enter ch and match all of them or, more specifically, chicken and match chicken soup and grilled chicken . I also