Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • QMap, index of entry without iterating through

    Solved
    18
    0 Votes
    18 Posts
    4k Views
    J.HilkJ
    Disregard almost everything I said πŸ™ˆ, of course the internal storage is sorted on key/value pair insert
  • Executable library permission?

    Unsolved
    13
    0 Votes
    13 Posts
    1k Views
    artwawA
    you might find it easier to install Qt on your raspi, together with the creator, then just use Remote Desktop session for developing directly on the raspi.
  • Run the executable file built in Ubuntu on Raspberry Pi Ubuntu

    Unsolved
    6
    0 Votes
    6 Posts
    686 Views
    sierdzioS
    @IknowQT said in Run the executable file built in Ubuntu on Raspberry Pi Ubuntu: @sierdzio If the arm64 and amd64 architectures are different for the same Ubuntu, do you need to make cross-compilation? Yes, cross-compile or compile natively on Raspberry Pi.
  • QCompleter with a QLineEdit into QGraphicsScene

    Unsolved
    3
    0 Votes
    3 Posts
    296 Views
    cfdevC
    Tested with Qt 5.15.2 on MSWindows 10 and Ubuntu 20.04 LTS The problem is the same. I forgot to say, I use QCompleter normally through the QLineEdit. m_textLineEditWidget->setCompleter(completer); I think that the QListView used for completer is not managed by the Scene, and it s for that the scale of it doesnt operate. Probably to fix it, I will need to create a ListView manually and Add it to the scene. :-/ What do you think ?
  • Move items in a QSortFilterProxyModel

    Unsolved
    27
    0 Votes
    27 Posts
    5k Views
    F
    hi, can anybody tell me how to implement moveRows() for the class derived from QSortFilterProxyModel: moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) it looks like we need to exchange the proxy indexes, but we can't access to the private members in the subclass
  • Do I need to use pointer to QImage to save memory?

    Solved
    4
    0 Votes
    4 Posts
    331 Views
    L
    @ChrisW67 Thank you for the explanation, I will stop returning image pointer now.
  • libqrencode undefined reference error

    Solved
    5
    0 Votes
    5 Posts
    522 Views
    T
    Nevermind, I solved it, I forgot to define the config as staticlib while building the qrencode library
  • QString::indexOf(QRegularExpression) is slower than indexOf(QRegExp)

    Unsolved
    13
    0 Votes
    13 Posts
    2k Views
    johnson54J
    @jeremy_k I put 'regular_expression.optimize();' before the whole loop, and it makes no help.
  • Free utility to convert Visual Studio .RC file to Qt .UI

    Solved
    10
    1 Votes
    10 Posts
    2k Views
    T
    @Sprezzatura I try to convert a dialog (with OCX control like a TableView) and your program crash!! Can you release the source code, so we can adjust/correct?? Thanks in Advance...
  • QTcpSocket/QMQTT - Strange Error Codes

    Solved network qtcpsocket mqtt
    8
    0 Votes
    8 Posts
    5k Views
    B
    @Pablo-J-Rogina yes, and it doesn't say much more than what can be gleaned from the function signature. What is missing is any discussion of why one might want to call it (in normal circumstances that is, not to work around what apparently is a bug). Also, as I asked, whether calling it might have any adverse effects.
  • Import resources in Qt Creator

    Unsolved
    2
    0 Votes
    2 Posts
    625 Views
    mrjjM
    Hi After you added the files to the res file, do you build the project ? (sorry the screenshots cant be uploaded here directly as its broken)
  • 0 Votes
    5 Posts
    437 Views
    mrjjM
    @Gabber Hi It's fine to close it and then just open another one in case you got new questions. This will keep the posts shorter and easier for newcomers to look at if they search for solutions.
  • QMake -- how to test for build type (release, debug)

    Solved
    4
    0 Votes
    4 Posts
    287 Views
    D
    Thank you. I was just going to reply that I found CONFIG on the qmake tests page, but y'all beat me to it. :) Thank you for the quick replies!
  • degrees, radians can't learn to use them

    Solved
    4
    0 Votes
    4 Posts
    306 Views
    JonBJ
    degrees, radians can't learn to use them Radians are for mathematicians, maybe physicists. Degrees are for the rest of us :)
  • QDateTimeAxis - how to set format of date the same as system has, but without time?

    Unsolved
    2
    0 Votes
    2 Posts
    221 Views
    artwawA
    @CuriousPan said in QDateTimeAxis - how to set format of date the same as system has, but without time?: QDateTimeAxis Should you feel brave and actually spend 30 seconds looking into the documentation, like I did, you would notice that there is a setFormat() method: https://doc.qt.io/qt-5/qdatetimeaxis.html#format-prop And that it takes well known format strings from QDateTime: https://doc.qt.io/qt-5/qdatetime.html#toString
  • How to draw with vertices, circle (and other shapes) ?

    Solved 2d graphics painter
    6
    0 Votes
    6 Posts
    937 Views
    timob256T
    @ mrjj why can't I get a full circle ??? #include "krug_qt.h" Krug_qt::Krug_qt(QWidget *parent) : QMainWindow(parent) { R = 90.0; q = 24; p = 24; kol_toch = 180; } Krug_qt::~Krug_qt() { } void Krug_qt::fillVertexArray() { float grad = 360.0/kol_toch; float grad_kol_toch = 0.0; // градусы*M_PI/180 = Ρ€Π°Π΄ΠΈΠ°Π½Ρ‹ int j; for (j = 0; j <= kol_toch; ++j){ integerVector.append(R * cos(grad_kol_toch*M_PI/180.0)); integerVector.append(R * sin(grad_kol_toch*M_PI/180.0)); grad_kol_toch = grad_kol_toch + grad; } } void Krug_qt::paintEvent(QPaintEvent *event) { integerVector.clear(); QPainter painter(this); // Π‘ΠΎΠ·Π΄Π°Ρ‘ΠΌ ΠΎΠ±ΡŠΠ΅ΠΊΡ‚ отрисовщика QPen pen_abris(Qt::black, 2, Qt::SolidLine, Qt::FlatCap); // ΠΊΠΈΡΡ‚ΡŒ обрисовки (компаса) painter.setRenderHint(QPainter::Antialiasing); // ΡƒΠ±ΠΈΡ€Π°Π΅ΠΌ Ρ€Π΅Π·ΠΊΠΈΠ΅ ΠΊΡƒΠ±ΠΈΠΊΠΈ painter.setPen(pen_abris); // УстанавливаСм ΠΊΠΈΡΡ‚ΡŒ обрисовки fillVertexArray(); // НабираСм массив painter.translate(this->width()/2, this->height()/2); // смСщСниС отрисовки qDebug() << integerVector.size(); int f = 0; for(int i =0; i<integerVector.size()/2; i++) { i++; f++; painter.drawPoint(QPointF(integerVector[--i],integerVector[i])); qDebug() << "f :"<<f; // painter.drawPoint(QPointF(integerVector[i],integerVector[i++])); // i++; } } [image: b782ea31-6cc8-4d5e-815c-3a70041efd3d.png]
  • Passing slot as parameter in function to connect to a signal

    Solved
    7
    0 Votes
    7 Posts
    547 Views
    J
    I have decided to change my funtion. QWidget* addPushButtonInTableCell(U2bYTES row, U2bYTES column, U2bYTES numberToPushButton, QTableWidget * pTableWidget , QWidget* parent, QString ruta, const char* slot) { QWidget *pWidget = new QPushButton(QString::number(numberToPushButton),parent); ... return pWidget; } Invoke QWidget* pWidget = addPushButtonInTableCell(0,15,pQ->u.cue.n, tableWidget , pMW->options, ":/ui/recursos/ExtrasInsert.png"); QObject::connect(pWidget,SIGNAL(clicked()), pMW->options, SLOT(on_pushButton_newJump_clicked())); It works fine.
  • QScrollArea

    Unsolved qscrollarea qt creator image display show images
    5
    0 Votes
    5 Posts
    995 Views
    cfdevC
    @Sai-Raul Look : https://doc.qt.io/qt-5/qscrollarea.html Whitout Qlablel.. There is QGraphicsScene with QGraphicsView.
  • How to uncheck the action on the toolbar

    Solved
    5
    0 Votes
    5 Posts
    728 Views
    Gojir4G
    @Mihan said in How to uncheck the action on the toolbar: So does it meen I must setChecked(false) by myself in lower version? Yes.
  • This topic is deleted!

    Unsolved
    5
    0 Votes
    5 Posts
    197 Views