Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • add one million points to a series,

    Solved
    7
    0 Votes
    7 Posts
    908 Views
    A
    @SGaist Thank you! I will reduce the acount of data point
  • Problem Postgresql 10.14

    Unsolved
    3
    0 Votes
    3 Posts
    308 Views
    W
    @SGaist thank you by reply. i found the solution. My computer have not the MSVCR120.DLL, i fix it installing the Miscrosoft Visual Studio 2013 x86 redistributable, i found the problem using de debuguer tool of QtCreator.
  • Problem sending capital characters to QLineEdit/QTextEdit with WinAppDriver/appium

    Unsolved
    11
    0 Votes
    11 Posts
    987 Views
    A
    Here's the complete Qt message list: "jeu. nov. 5 16:34:46 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 356 wParam : 0 lParam : 1089846887984 "jeu. nov. 5 16:34:46 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 3107661501 lParam : -25 "jeu. nov. 5 16:34:46 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 356 wParam : 0 lParam : 1089846887984 "jeu. nov. 5 16:34:46 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 356 wParam : 0 lParam : 1089846887984 "jeu. nov. 5 16:34:46 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -5 "jeu. nov. 5 16:34:46 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -6 "jeu. nov. 5 16:34:46 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -2 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 356 wParam : 0 lParam : 1089846887984 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -5 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -6 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -2 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -1 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -1 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -2 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -3 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -7 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 0 lParam : -25 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 356 wParam : 0 lParam : 1089846887984 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 0 lParam : -25 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 356 wParam : 0 lParam : 1089846887984 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -1 "jeu. nov. 5 16:34:50 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -1 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -1 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -2 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -2 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -2 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -2 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -2 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -2 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -2 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -2 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 8276 lParam : -2 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 70 wParam : 0 lParam : 1089846888016 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 71 wParam : 0 lParam : 1089846888016 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 28 wParam : 1 lParam : 19180 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 134 wParam : 1 lParam : 0 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 6 wParam : 1 lParam : 0 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 641 wParam : 1 lParam : 3221225487 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 642 wParam : 2 lParam : 0 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 7 wParam : 0 lParam : 0 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 15456 lParam : 4294967292 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 0 lParam : -12 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 0 lParam : -12 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 4294967295 lParam : 0 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 61 wParam : 0 lParam : -12 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 256 wParam : 255 lParam : 21299201 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 537 wParam : 7 lParam : 0 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 257 wParam : 255 lParam : 3242524673 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 256 wParam : 231 lParam : 1 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 258 wParam : 65 lParam : 1 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 256 wParam : 231 lParam : 1073741825 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 258 wParam : 66 lParam : 1073741825 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 256 wParam : 231 lParam : 1073741825 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 258 wParam : 67 lParam : 1073741825 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 256 wParam : 255 lParam : 21299201 "jeu. nov. 5 16:34:51 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 257 wParam : 255 lParam : 3242524673 "jeu. nov. 5 16:34:54 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 134 wParam : 0 lParam : 0 "jeu. nov. 5 16:34:54 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 6 wParam : 0 lParam : 0 "jeu. nov. 5 16:34:54 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 28 wParam : 0 lParam : 8128 "jeu. nov. 5 16:34:54 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 8 wParam : 0 lParam : 0 "jeu. nov. 5 16:34:54 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 641 wParam : 0 lParam : 3221225487 "jeu. nov. 5 16:34:54 2020" > "windows_generic_MSG" hwnd : 0x1605e2 message : 642 wParam : 1 lParam : 0
  • how to get and purge events from queue?

    Solved
    9
    0 Votes
    9 Posts
    2k Views
    D
    turns out that what i described above was EXACTLY what i needed. code below: typedef std::deque<float> FloatQueue; class CScrollQueue : public CT_Timer { typedef CT_Timer _inherited; static CScrollQueue *s_this; FloatQueue i_floatQueue; CDataBrowser *i_browserP; #define kScrollTimerInterval 0.1f void DoVScroll(float incrementF) { PointS32 scrollPos(i_browserP->GetScrollPos()); scrollPos.v += incrementF; i_browserP->SetScrollPos(scrollPos); } public: CScrollQueue() : _inherited("CScrollQueue", kScrollTimerInterval), i_browserP(gApp->GetDataBrowser(BW_Control_TRACKS)) { call(); } static CScrollQueue* Get() { if (s_this == NULL) { s_this = new CScrollQueue(); } return s_this; } void vscroll(float angleF) { if (angleF) { if (i_floatQueue.empty()) { SetFireInterval(kScrollTimerInterval); } i_floatQueue.push_back(angleF); } } OSStatus operator()() { while (!i_floatQueue.empty()) { float velocityF(-i_floatQueue.back() / 2); i_floatQueue.clear(); // during DoVScroll, more events // may come into the floatQueue DoVScroll(velocityF); } SetFireInterval(kEventDurationForever); return threadTimerContinue_noPrime; } }; // static CScrollQueue* CScrollQueue::s_this = NULL; then, in my eventFilter method: case QEvent::Wheel: { if (objP == getTracksList()->viewport()) { QWheelEvent *wheel_event(static_cast<QWheelEvent*>(eventP)); double angleF(wheel_event->angleDelta().y()); handledB = angleF != 0; if (handledB) { CScrollQueue::Get()->vscroll(angleF); } } } break;
  • Should I limit the number of QAudioOutput instances in my app?

    Unsolved
    1
    0 Votes
    1 Posts
    131 Views
    No one has replied
  • Make async readyRead() calls with QTcpServer/QTcpSocket in combination with QEventLoops

    Unsolved
    1
    1 Votes
    1 Posts
    500 Views
    No one has replied
  • Resources problem

    Solved
    6
    0 Votes
    6 Posts
    401 Views
    SGaistS
    Hi, I'd rather avoid the program directory as application are usually installed in folders that have write restrictions. As @Pl45m4 suggested, use QStandardPaths to get a suitable write location.
  • Show cursor in read-only QTextEdit

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    LorenDBL
    @jeremy_k said in Show cursor in read-only QTextEdit: I'm running Kubuntu 20.04 with Qt version 5.18.5. Presumably this is a typo. 5.15 is the end of the Qt 5 series. Oops, 5.18.5 is my Plasma version. I'm on Qt 5.12.8. Override keyPressEvent() in the subclass and do the condition testing there. Don't pass the event to QTextEdit::keyPressEvent() unless the conditions are met. That's actually what I ended up doing.
  • QML Image MouseArea onClicked not working

    Solved
    10
    0 Votes
    10 Posts
    3k Views
    SPlattenS
    @LeLev Thank you.
  • Loading qm file from ressources fails

    Solved
    4
    0 Votes
    4 Posts
    468 Views
    S
    I missed stating the separator in the method. Like this it works: void LanguageSelector::loadLanguage(const QLocale::Language &newLanguage) { if (!mTranslator->load(QLocale(newLanguage), QLatin1String("quiz"), QLatin1String("."), QLatin1String(":/translations"))) { auto metaEnum = QMetaEnum::fromType<QLocale::Language>(); qDebug() << tr("load language %1 failed") .arg(metaEnum.valueToKey(newLanguage)); } else { qDebug() << mTranslator->filePath(); } }
  • QIODevice readAll() function

    Solved
    12
    0 Votes
    12 Posts
    1k Views
    Christian EhrlicherC
    As you can see QRingBuffer is created in another thread. Since this is used from your QTcpSocket (first backtrace) the only way is that it was created in the main thread.
  • pyside2 qtcharts updating its self as month elapse

    Unsolved
    4
    0 Votes
    4 Posts
    396 Views
    JonBJ
    @erico Update itself when/in response to what? You have to clarify what you are looking to do.
  • How to set top-left cell text of QTableWidget ?

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    BramhaB
    Hi, @sonichy you can add text on that by finding its child QAbstractButton and then add a widget to it as QLabel using the vertical layout as below. QAbstractButton* button = qFindChild< QAbstractButton* >(TableWidget); if (button) { QVBoxLayout* lay = new QVBoxLayout(button); lay->setContentsMargins(0, 0, 0, 0); QLabel* label = new QLabel("No"); label->setStyleSheet("QLabel {font-face: ArialMT; font-size: 10px; color: #FFFFFF; font-weight: bold; }""QToolTip { color: #ffffff; background-color: #000000; border: 1px #000000; }"); label->setAlignment(Qt::AlignCenter); label->setToolTip("Text"); label->setContentsMargins(2, 2, 2, 2); lay->addWidget(label); }
  • QTcpServer / QTcpSocket help

    Unsolved
    17
    0 Votes
    17 Posts
    1k Views
    SPlattenS
    @VRonin , thank you, I will take a look now.
  • Partial text selection in QTreeView

    Unsolved qtreeview qt4.8 selection
    7
    0 Votes
    7 Posts
    2k Views
    G
    @SGaist of course! This OP gave up, as I'm about to do while this discussion gave me hope of handling mouse events in the view myself This discussion didn't really go anywhere at all
  • QT example sqlbrowser : clarification about variables scopes

    6
    0 Votes
    6 Posts
    628 Views
    Christian EhrlicherC
    @Thombou Yes :)
  • no member named 'errorOccurred' in 'QAbstractSocket'

    Solved
    3
    0 Votes
    3 Posts
    4k Views
    Christian EhrlicherC
    Then please mark this topic as solved. Thx.
  • Use QThread or Timer to constantly update GUI?

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    SGaistS
    In that case you should consider the model view paradigm. Fetch your data, update the model(s) if needed and signal what has changed so the view(s) can update their content. You can use QDataWidgetMapper to automate that part.
  • Scene selectedItems() not updated when setSelected(true)

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    Pl45m4P
    @jsm_d You said that before. If you don't show what you've done, one can only guess what's happening. @jsm_d said in Scene selectedItems() not updated when setSelected(true): Is there a globla flag or somethig that only notifies the selectionchange when the selection is done with mouse?? There is no difference between selecting by code or with mouse. When using your mouse, there is only the mouse click event, that is happening before. But for the item, it's the same.
  • Source code of anti-aliasing of QPainter (QImage)

    Solved
    5
    0 Votes
    5 Posts
    553 Views
    MartinChan3M
    @SGaist It seems that (QRasterizer)[https://code.woboq.org/qt5/qtbase/src/gui/painting/qrasterizer.cpp.htm] is what I want. I used to doubt that QImage didn't use CPU but GPU(opengl) to render, but it seems not that way.