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
1 answer

Difference in relative file path: debug mode and release mode of Qt Creator

QFile file("test.txt"); if (file.open(QIODevice::ReadOnly)) { qDebug()<<"You got me."; } I am using: Qt 4.8.6 with MSVC 2010 Qt Creator 3.1.1 Windows 7 (32 bit) From the above code, if .pro file has not been changed, the corresponding…
Tay2510
  • 5,748
  • 7
  • 39
  • 58
3
votes
1 answer

Qt 5 encoding problems (UTF-8, Windows-1250, Windows-1251)

All my source file are UTF-8 converted. All my files Im opening are UTF-8. My application is opening UTF-8 coded file which contains translated text for 3 languages: English, Polish and Russian and is saving the data to a file into 3 separate…
killdaclick
  • 713
  • 1
  • 10
  • 19
3
votes
1 answer

How to render QPlainTextEdit content to QPixmap with colors?

I was successfully using following code to render the content of a QTextEdit to QPixmap. But this fails for QPlainTextEdit. When I use QPlainTextEdit instead of QTextEdit, it rendered the content without any colors (all in black/white). QPixmap*…
Morpheus
  • 1,722
  • 5
  • 27
  • 38
3
votes
1 answer

QScrollArea remove space between area content and scroll bar.

I am facing a problem with QScrollArea. In particular I can not find the right QSS rule for removing the 3px space between QSrollArea QFrame and QScroll. The space I'd like to remove is the one pointed by the red arrow in the picture. I also added a…
Lorenzo
  • 81
  • 1
  • 5
3
votes
1 answer

in Qt 4.8 how to set "Qt::PreciseTimer"

As the title says: I have this snippet: QTimer timerdata; I can start the timer by calling timerdata.start(5); However, I am not getting 5 msec...I know that in Qt 5.x there are three levels of precision for timers: Qt::PreciseTimer: About 1 ms…
Samer
  • 1,923
  • 3
  • 34
  • 54
3
votes
2 answers

setObjectName is not setting the thread name in Qt

I am using Qt 4.8 on Linux. I have the class ZoneManagerThread that inherits the class QThread. In the constructor of this class I am calling the following routine: this->setObjectName("ZoneManagerThread"); However when I execute ps -eLf I don't…
user3629119
  • 151
  • 1
  • 9
3
votes
1 answer

QModelIndexList from a QTreeView giving debug assertion

In one of my projects on Qt, I have this requirement of selecting multiple items from a folder like view (tree-view), and populate the selected items in another widget. To display available items for multi-selection, I'm using a QTreeView, and…
Manmohan Singh
  • 439
  • 1
  • 3
  • 15
3
votes
1 answer

Which Class has to be reimplemented for custom Selection in QTableWidget?

QTableWidget consists of several Selection Modi, which are selectable with the method setSelectionMode (QAbstractItemView::SelectionMode mode) None of the given modi fits the type of interactive selection i want to have. I want to implement a…
Stefan Lindblad
  • 410
  • 2
  • 17
3
votes
1 answer

How to Drag and Drop Custom Widgets?

I have created my own custom widget and I want to support internal drag and drop for the widgets. I have added 4 of my custom widgets in a vertical box layout. Now i want to drag and drop the custom widgets internally. To be more clear, If i drag…
New Moon
  • 787
  • 6
  • 21
  • 35
3
votes
5 answers

How to Move Up a Selected Row in Qt

I have a QTableView with 3 rows and 2 columns. (Here I am using a QStandardItemModel). I want to move up/move down a single row when a QPushButton is clicked. How can I move up/down a row in QTableView? Thanks for your reply vahancho. I have already…
New Moon
  • 787
  • 6
  • 21
  • 35
3
votes
1 answer

Initialise a QGLWidget with a glClearColor

I have a QMainWindow with a QGLWidget in it. I want the widget to display a 'clear' colour of my own choice, instead of the default black screen. void MyQGLWidget::initializeGL(void) { glClearColor(0.7f, 0.7f, 0.7f, 1.0f); } void…
Yellow
  • 3,955
  • 6
  • 45
  • 74
3
votes
0 answers

Porting from Qt 4.x to Qt 5

Has anybody ported a Qt 4.x application to Qt 5? We are about to port some software that makes extensive use of Qt 4.8. We use the Core, GUI, Network, OpenGL, Test, Webkit, and Xml libraries and our software is available on Windows, OS X, and…
Daniel Hedberg
  • 5,677
  • 4
  • 36
  • 61
3
votes
3 answers

Detect end of movement of QMainWindow / QDialog (Qt 4.8)

I’m using Qt 4.8.3 on X11. I need to know when the user ends with dragging a window around the screen, this in order to read the final position and eventually start an animation to adjust the window position to an “allowed” one. I noticed that the…
Matteo Murgida
  • 161
  • 2
  • 7
3
votes
0 answers

QtRuby painting crashing on Windows but not Linux

I'm new to QT and am having crashes on Windows 7 x64 when trying to create custom paint events. I'm using Ruby 1.9.3p125 and qtbindings-4.8.3.0-x86-mingw32. This crash does not show up when on my work machine, Redhat Linux using Ruby 1.9.2p180 and…
3
votes
0 answers

Configure qxt library under Windows

I want to include into my Qt 4.8.1 project the Qxt 0.6.2 library. I followed the steps from their user guide and at the end the library was installed in: C:\Qxt. I have added these two lines in my project .pro file: CONFIG += qxt QXT += core…
croppio.com
  • 1,823
  • 5
  • 28
  • 44