Questions tagged [qt4.8]

For issues relating to using the Qt framework, version 4.8 and no other version. Do not use if you just accidentally use that version. Use the tag qt for Qt related issues that will likely occur in other versions as well.

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 was created by Trolltech, and is currently developed and maintained by Digia.

330 questions
3
votes
2 answers

Qt- How to display the Text Edit String in a List View?

I have a QTextEdit , 2 QPushButtons (Add n Remove Buttons) and a QListView. When i am entering the text in the Text Edit and click the Add Button, the Text should be added in the List View. Then, if I select any one of the added text from the List…
New Moon
  • 787
  • 6
  • 21
  • 35
3
votes
3 answers

How can I remove borders from a Windows QML application

This is similar to question 4799748, but I'd like to remove Windows borders from a QML application, so it starts up without minimise/maximise/close etc. I guess I need to set the Window flags to Qt.CustomizeWindowHint, but I'm new to QML and can't…
rolinger
  • 665
  • 7
  • 17
3
votes
1 answer

Remove a QListWidgetItem from QListWidget?

I checked latest documentation, nothing related was found. I place a pointer to a QListWidgetItem in my class, and I want to use some function from QListWidget to remove this child item. What I found was only to remove this by ID, takeItem (i). Is…
daisy
  • 22,498
  • 29
  • 129
  • 265
3
votes
0 answers

How to implement a smooth QGraphicsView::centerOn(QGraphicsItem)?

I have a QGraphicsItem descendant called lnk, and I use this code to move the graphics view rect to its location into the scene: ui->graphicsView->centerOn(lnk); Now, I would like the view to scroll smoothly to the location of the item (like google…
morde
  • 231
  • 1
  • 3
  • 8
2
votes
1 answer

JSON object Comparison in QT of same order and length

I have two objects which I wish to compare and display the differences of the values in the two objects. One is my reference object and another is my testing object. The order of the keys, the length of the objects are the same. The integer and…
RJ7
  • 33
  • 5
2
votes
1 answer

Which functions to override with a custom QSortFilterProxyModel

So I have a custom QAbstractItemModel that overrides the following functions: QVariant data(..) const; QVariant headerData(..) const; QModelIndex index(..) const; QModelIndex parent(..) const; int rowCount(..) const; int columnCount(..)…
twohobos
  • 76
  • 7
2
votes
1 answer

How to get the row number of widget placed in a cell of Qtablewidget when it get clicked?

What i'm trying is to get the row number of QcomboBox when user selects items. Although its easy to to get the cell column and row using cellClicked(int,int) signal, but it only works when there is no widget on the cell. so how to get the row…
secretgenes
  • 1,291
  • 1
  • 19
  • 39
2
votes
1 answer

How to set QWidget in QTabWidget header?

I want to insert QLabel and QLineEdit in the header of QTabWidget. I've read the documentation of Qt but didn't able to find any function that can set any Qwidget in the Header of QTabWidget. How can i do this? Or do i have to override the…
secretgenes
  • 1,291
  • 1
  • 19
  • 39
2
votes
1 answer

How to execute "confirm" dialog of gnome session manager from Qt application when logout gnome session (without using QSessionManager)

I am developping the application using Qt4.8, on CentOS6.3 Normaly, When I execute "logout" while runnning the application, As it is, the application terminated and session logs out. How can I do to suppress this and allow the Gnome session manager…
taki
  • 21
  • 1
2
votes
1 answer

How to cycle through all widget in a QVBoxLayout

I have a QVBoxLayout created through the drag and drop section. Inside of it AT RUN TIME I insert some widgets with the command ui->verticalLayout->insertWidget() //using appropriate options. All widgets I insert are of the same type/class. I would…
Wing
  • 642
  • 2
  • 5
  • 16
2
votes
1 answer

Can a QtCore Signal be set to the current class?

I am attempting to use a QtCore.Signal to send a new instance of a class to the object's parent. What I am attempting to do is as follows, but fails with: NameError: name 'myClass' is not defined class myClass(QtGui.QMainWindow): mySignal =…
Tom Myddeltyn
  • 1,307
  • 1
  • 13
  • 27
2
votes
2 answers

Qt: How to pass variable value betweeen QWizardPages with registerField()

I'm working on Qt 4.8.5. I'm using a QWizard structure with its QWizardPages (lets name them wp1, wp2, wp3,...). I need to pass one value from wp2 to wp4 but every time I try it, I get an empty string :( The value I need is on a variable (QString…
Megasa3
  • 766
  • 10
  • 25
2
votes
2 answers

Creating a QImage from an XBM

Creating a QBitmap from raw data stored in the XBM format, can easily be done like so QBitmap::fromData(width, height, data, QImage::Format_MonoLSB), with data being the raw data of the XBM file. Now, what if we want to create a QImage this time?…
gpalex
  • 826
  • 1
  • 11
  • 27
2
votes
1 answer

Qt - How to detect Resume from Standby & Mem states

We are currently developing an embedded device based on the am335x sdk from ti (based on Arago project) The main application on the device is being developed using Qt4.8 We want to detect when the device is entering Standby / Mem states so that we…
evanol
  • 21
  • 2
2
votes
0 answers

QMoveEvent for QMdiSubWindow is never emitted

I have subclassed the QMdiSubWindow and overwritten the QMoveEvent. But when actually moving the subwindow, the QMoveEvent is never emitted. Any ideas why that could be? Any suggestions on how to fix my problem? subwindow.h #ifndef…
hbrown
  • 41
  • 4