qt

Qt Text Selection White Line and Text Width

你。 提交于 2021-02-07 20:27:36
问题 I want to customize the text Selection in QTextEdit, I want two things: Remove white spaces/lines when selecting. Be able to choose the width of the selection, either the widget width or the text width. White Spaces/Lines : Typically, what I would like is that : (from Bear app) : Bear Text Selection While using QTextEdit widget, I've noticed that when I select the text, there are white lines between selected lines : White Lines Issue To fix this, I tried some things: I have set some colors to

Is it possible to have a individual marker size for each point in a QScatterSeries?

非 Y 不嫁゛ 提交于 2021-02-07 20:26:47
问题 I want to plot a series of points (distance r, angle a, strength s) in a QPolarChart QPolarChart *chart = new QPolarChart(); ScatterSeries *series1 = new QScatterSeries(); series1->setMarkerSize(s); for(int i = 0; i < count; i++) { series1->setMarkerSize(s); // -> of course changes the marker size for the complete series series1->append(r, a); } chart->addSeries(series1); Now I want to make the marker size individual for each point, basically the size should represent the "strength" of each

How to make the actual table adjust its size to the QTableWidget container?

末鹿安然 提交于 2021-02-07 20:24:00
问题 I do not even know how to ask this question. I have the following table: You can see how the QTableWidget is selected, but the actual table is smaller. How can I make the table to be the same size of the QTableWidget container? I am using QT-Designer. Thanks! 回答1: from Qt Designer there are horizontalHeaderStretchLastSection and verticalHeaderStretchLastSection properties on QTableWidget. 来源: https://stackoverflow.com/questions/13689184/how-to-make-the-actual-table-adjust-its-size-to-the

Qt5 Application Does Not Run

十年热恋 提交于 2021-02-07 20:23:42
问题 I created an application using Qt 5 (compiled with Visual Studio '12). It works on my machine. However, it doesn't work when I attempt to run it on another machine. The output I collected through cmd yielded an empty file. The directory structure is as follows: myapp.exe icudt52.dll icuin52.dll icuuc52.dll libEGL.dll libGLESv2.dll msvcp120.dll msvcr120.dll Qt5Core.dll Qt5Gui.dll platforms/qminimal.dll platforms/qwindows.dll The most relevant post I found was Application deployed with QT5

Qt Creator 4.8.4. windows 7 - 64bit installation

霸气de小男生 提交于 2021-02-07 20:18:05
问题 I have some difficulties with QT, which I need for school for some GUI applications. I have recently done these steps: 1) mingw-get-inst-20120426.exe from SourceForge installed to C:\MinGW\ with default settings. 2) Qt libraries 4.8.4 for Windows (minGW 4.4, 317 MB) from QT Project installed to C:\Qt\ with default settings. Here an error occurs: !!!There is a problem with your MinQW instalation !!!g++ not found in c:\MinGW\bin\ !!!Do you still want to continue? Yes I checked c:\MinGW\bin\

How does QAbstractItemModel Represent Tree?

别等时光非礼了梦想. 提交于 2021-02-07 20:15:49
问题 I'm still having a great deal of difficulty understanding QAbstractItemModel's representation of items. There are two methods that return QModelIndex items that just aren't making any sense to me. QModelIndex QAbstractItemModel::index(int row, int column, const QModelIndex& index) is the first. What is the view passing to this function? I index the specific tree item to have an index created for? If so, what's the point of the function? Why not just return index? What do row and column

Qt Creator 4.8.4. windows 7 - 64bit installation

亡梦爱人 提交于 2021-02-07 20:14:32
问题 I have some difficulties with QT, which I need for school for some GUI applications. I have recently done these steps: 1) mingw-get-inst-20120426.exe from SourceForge installed to C:\MinGW\ with default settings. 2) Qt libraries 4.8.4 for Windows (minGW 4.4, 317 MB) from QT Project installed to C:\Qt\ with default settings. Here an error occurs: !!!There is a problem with your MinQW instalation !!!g++ not found in c:\MinGW\bin\ !!!Do you still want to continue? Yes I checked c:\MinGW\bin\

How does QAbstractItemModel Represent Tree?

ⅰ亾dé卋堺 提交于 2021-02-07 19:59:43
问题 I'm still having a great deal of difficulty understanding QAbstractItemModel's representation of items. There are two methods that return QModelIndex items that just aren't making any sense to me. QModelIndex QAbstractItemModel::index(int row, int column, const QModelIndex& index) is the first. What is the view passing to this function? I index the specific tree item to have an index created for? If so, what's the point of the function? Why not just return index? What do row and column

Cannot cross-compile Qt 5.7 for Raspberry PI because it “requires a C++11 compiler”

你。 提交于 2021-02-07 19:56:25
问题 I want to cross compile qt5 on RPi2 according to this RaspberryPi2EGLFS when I want to configure in step7 I see this error and I don't have any idea how to solve it. . . collect2: error: ld returned 1 exit status Makefile:91: recipe for target 'c++11' failed make: *** [c++11] Error 1 C++11 disabled. ERROR: Qt requires a C++11 compiler and yours does not seem to be that. Please upgrade. I use antergos x64. 来源: https://stackoverflow.com/questions/38232461/cannot-cross-compile-qt-5-7-for

Qt: Roundoff of 12.625 by 2 returns 12.62

China☆狼群 提交于 2021-02-07 19:42:07
问题 I can't get it why the ff code returns 12.62 instead of 12.63 QDebug << QString::number(12.625, 'f', 2); and also what will be the solution for this? Currently my solution is this QDebug << QString::number(12.625 + 0.0001, 'f', 2); and it will return 12.63 . btw my OS is ubuntu 11.04 回答1: GCC uses "Round to Even" or "Banker's Rounding" as it's default mode while Visual Studio uses "Round away from Zero" From the GCC docs: Rounding This is the default mode. It should be used unless there is a