Questions tagged [qt4.6]

For issues relating to using the Qt framework, version 4.6.

Qt (pronounced officially as cute (/kyut/) though commonly pronounced as Q.T. (/ˈkyu ti/)) is a cross-platform application development framework widely used for the development of GUI programs (in which case it is known as a widget toolkit), and also used for developing non-GUI programs such as console tools and servers. wikipedia

Qt can be downloaded here.

Qt was created by Trolltech, and is currently developed and maintained by Digia.

53 questions
24
votes
8 answers

QCompleter Custom Completion Rules

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…
jcuenod
  • 55,835
  • 14
  • 65
  • 102
13
votes
2 answers

Any good implementation of Qt + Lisp?

I was searching for a good Qt + Lisp implementation on the internet and couldn't find any. Most projects were closed down or so. Does anybody know of a good Common Lisp + Qt integration? Thanks in advance.
Daniel Higueras
  • 2,404
  • 22
  • 34
12
votes
1 answer

How can you edit a QTableView cell from a QTest unit test?

I'm writing a unit test for a custom Validator in a QTableView using the QTestLib framework. One of the most basic test cases could be described like this: Double click the table cell in the third column and the fourth row, and append the number…
Tim Meyer
  • 12,210
  • 8
  • 64
  • 97
11
votes
3 answers

How to work with OpenGL and QT?

I'm Working on a small project and i need to work with OpenGL + QT I'm Newbie in both of them. So i need a good tutorial that illustrates how to work with them each other not individually is it better to work OpenGL on QT Creator or use QT Visual…
Amr Ramadan
  • 201
  • 2
  • 3
  • 6
10
votes
2 answers

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

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),…
Claire Huang
  • 961
  • 1
  • 18
  • 30
10
votes
2 answers

Where to control the QWizard button?

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…
Claire Huang
  • 961
  • 1
  • 18
  • 30
10
votes
1 answer

How to produce Capital hexadecimal digits with QString::arg() ? [QT]

I'm trying to create a QString which is a hexadecimal number with its letter digits in Capitals instead of small caps, how can it be done? QString( " %1" ).arg( 15, 1, 16 ) yields f and I'd like F
Petruza
  • 11,744
  • 25
  • 84
  • 136
7
votes
1 answer

how to calculate qfont pixel size from point size

How do I convert my font on a QGraphicsObject from point size to pixel size? I need to do this so the fonts will look right when I print my QGraphicsScene using QGraphicsScene::render().
David Burson
  • 2,947
  • 7
  • 32
  • 55
7
votes
7 answers

how to center a Qt mainform on the screen?

I've tried these in my mainform's constructor: QRect desktopRect = QApplication::desktop()->availableGeometry(this); move(desktopRect.center() - frameGeometry().center()); QRect desktopRect =…
David Burson
  • 2,947
  • 7
  • 32
  • 55
7
votes
1 answer

How to use OpenGL functions on a QT OpenGL Widget?

I'm starting off QT 4.6's example "OpenGL - 2D painting" It uses a subclass of QGLWidget, and makes painting operations with the class QPainter. I'd like to know how to do drawing directly with OpenGL functions on the OpenGL Widget.
Petruza
  • 11,744
  • 25
  • 84
  • 136
7
votes
1 answer

Reduce a table view's cell padding or margin

I'm using a Table View. I'd like to remove the cell padding (or margin) so I can squeeze more cells in less space. How can this be achieved? The cells size is set to 32 pixels on QT designer, if I set it smaller, the cells contents don't show and…
Petruza
  • 11,744
  • 25
  • 84
  • 136
6
votes
3 answers

Qt4 expanding tabs in QTabBar

I am subclassing QTabWidget to add a QTabBar, who's tabs stretch over the whole width of the tabBar. Therefore I am setting the expanding property to true. This doesn't seem to change anything about the behavior of the tabs. Did anyone encounter the…
user636530
  • 63
  • 1
  • 4
5
votes
0 answers

QSpinBox buttons size

Is there a way to obtain the size of the buttons/arrows of a Qt QSpinBox? Note: This question has nothing to do with changing the style of a QSpinBox. On the contrary: The intent is to use the QSpinBox style as given and obtain at runtime the size…
user674263
  • 131
  • 1
  • 4
4
votes
2 answers

how to print a QGraphicsScene that has text and graphics

I have a QGraphicsScene that has graphics as well as text drawn on it. When I try to print, the graphics are fine, but the text is using a font size defined in points, so scene->render() when I pass it a QPainter initialized with a QPrinter, has…
David Burson
  • 2,947
  • 7
  • 32
  • 55
4
votes
1 answer

Hook key & key combinations from keyboard with Qt 4.6

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…
Viet
  • 17,944
  • 33
  • 103
  • 135
1
2 3 4