Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.2k Topics 455.5k Posts
  • Replacing widget pointer in layout

    Solved
    10
    0 Votes
    10 Posts
    735 Views
    S
    Ok I think the issue is solved. Again something learned. void Game::makeNewMinefield() { auto newMinefield = new Minefield{ mDefaultFieldWidth, mDefaultFieldHeight, mDefaultMines }; auto returnItem = mBottomFrame->layout()->replaceWidget( mMinefield, newMinefield); if(!returnItem) { QMessageBox::critical(this, tr("Internal Error"), tr("Minefield could not be replaced"), QMessageBox::Close); qApp->quit(); } delete returnItem; mMinefield = newMinefield; }
  • QtGstreamer, multiudpsink - how to add clients?

    Solved
    5
    0 Votes
    5 Posts
    870 Views
    SGaistS
    There seems to be some caching issues. Don't worry it will appear as solved :-)
  • detect if mouse buttons are pressed when sliding into widget

    Solved
    17
    0 Votes
    17 Posts
    5k Views
    S
    I could solve the issue with the example code. I had to add a member which remembers the last cell in the event filer. Than i could solve my Issue like this: if(event->type() == QEvent::MouseMove) { auto mouse_event = static_cast<QMouseEvent*>(event); QRect rect{cell->mapToGlobal(QPoint(0, 0)), cell->size()}; if(mouse_event->buttons().testFlag(Qt::LeftButton) && mouse_event->buttons().testFlag(Qt::RightButton)) { auto widget = qApp->widgetAt(mouse_event->globalPos()); if(widget) { auto currentCell = qobject_cast<Cell *>(widget); if(!currentCell) { if(mLastCell) { mLastCell->handleMouseMoveEventOutside(mouse_event); } mLastCell = nullptr; return true; } if(currentCell != mLastCell) { if(mLastCell) { mLastCell->handleMouseMoveEventOutside(mouse_event); } currentCell->handleMouseMoveEventInside(mouse_event); mLastCell = currentCell; } } return true; } }
  • QSql Database Segment Fault

    Solved
    7
    0 Votes
    7 Posts
    888 Views
    Christian EhrlicherC
    Then please mark the topic as solved, thx :)
  • qtcreator autocompletion for c++ auto keyword

    Solved
    5
    0 Votes
    5 Posts
    472 Views
    aha_1980A
    @Mr-Pang You can install it with the online installer together with a recent Qt version. That's how I do it on Ubuntu 18.04 ;)
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • Dynamic Property for stylesheet

    Solved
    3
    0 Votes
    3 Posts
    858 Views
    B
    @mrjj Thank you very much. I've tried to solve this problem for hours, but the solution was so easy.
  • Shared Library: Copying after build (Install)

    Solved
    5
    1 Votes
    5 Posts
    2k Views
    JKSHJ
    Another way is to add make install as a custom build step in Qt Creator: https://doc.qt.io/qtcreator/creator-build-settings.html
  • sendPostedEvents() or processEvents() causes SIGSEGV

    Unsolved
    8
    0 Votes
    8 Posts
    980 Views
    SGaistS
    So it looks like you are trying to push everything possible all the time. You should rather optimise your data processing so your GUI updates "make sense". There's no use trying to do updates at 1000Hz while the computer can at best be at about 100
  • Qt (creator) concept / hierarchy - perhaps off -topic ?

    Unsolved
    11
    0 Votes
    11 Posts
    693 Views
    fcarneyF
    I thought it might be fun to make a console based blue tooth sniffer using Qt. I may have to play with that for fun.
  • How to set QSsl for static build

    Unsolved
    6
    0 Votes
    6 Posts
    733 Views
    mrjjM
    @pjorgegerman Hi https://doc.qt.io/archives/qt-5.5/build-sources.html#openssl-v1later "From Qt version 5.2 onwards, the officially supported version for OpenSSL is 1.0.0 or later. Versions >= 0.9.7 and < 1.0.0 might work, but are not guaranteed to." So OpenSSL v1.0.2L should work. If you have issues with compiling it, search the forum. other have done it before. https://forum.qt.io/topic/94328/qt-static-with-openssl-issue Yes building a static version takes lots of effort. Depending on your SQL needs later, it might also be a small fight if its not SQLLite you want to use. Its best to start clean over every time as keeping old build artifacts, more often cause issues than speed up the process. This one QtXlsx ? https://github.com/dbzhang800/QtXlsxWriter If yes, then i would go with option 2 Usage(2): Use source code directly and compiled it into the app to avoid having to build the module as static.
  • Multiple QMainWindow instances

    Solved
    3
    0 Votes
    3 Posts
    1k Views
    V
    @sierdzio Thanks a lot for the clarification
  • QJsonObject: Modify field value

    Solved
    11
    0 Votes
    11 Posts
    2k Views
    F
    @JonB thank you! Now I got it!
  • Making QPushButtons span multiple columns in QGridLayout

    Solved
    25
    0 Votes
    25 Posts
    17k Views
    Q
    Sorry, I know it's like over a year later, but I have finally marked it as solved. Thanks for the help.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    13 Views
    No one has replied
  • you don't seem to have 'make' or 'qmake' in your PATH

    Unsolved
    84
    1 Votes
    84 Posts
    29k Views
    A
    @jsulm sorry,but I want to know what exactly that x11.. because i understood x11 is for windowing system..(shall i ask more about x11 which you talking) but i am using the operating system: debian(linux) beagleboneboard Qtcreator(building to support beagleboneboard)...
  • Stop and destroy pending QQmlIncubators

    Unsolved
    1
    0 Votes
    1 Posts
    74 Views
    No one has replied
  • How to break from the Waitforreadyread in QUdpSocket

    Unsolved
    2
    0 Votes
    2 Posts
    297 Views
    aha_1980A
    Hi @ManiRon, is there a reason you need to use waitForReadyRead()? Things would be much easier if you just connect a slot to the readyRead() signal. But well, if you insist to do it like that, then you'll have to create a loop and give the wait function a timeout. Then you call it again if the connection is not about to close. But honestly, that feels like an ugly hack. Regards
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • 0 Votes
    4 Posts
    468 Views
    aha_1980A
    @Snorkelbuckle said in QRegularExpressionValidator matching incorrectly lines with leading or trailing whitespace: Okay, silly me. This is really a logic error on my part and not fully understanding how the built-in validators work I've gone that way too ;) It looks like I need to create a custom validator by subclassing QValidator and making use of QValidator::Intermediate in the validate() function. Does this sound right to you? For some problems that's indeed the only possible way. But before you start: what do you want to achive? If it's just disabling of a button, then you can use hasAcceptableInput() in a textChanged() slot. If you really want to forbid to just enter trailing spaces, then I'm honestly not sure how to achive that. Regards