Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Strange signal handling (nested eventloops)

    Unsolved
    12
    0 Votes
    12 Posts
    977 Views
    jsulmJ
    @ocgltd said in Strange signal handling (nested eventloops): Since the db connection cannot be shared between threads Each thread can have its own db connection
  • C++/Qt signals and dynamic memory operation

    Unsolved
    9
    0 Votes
    9 Posts
    867 Views
    T
    @Christian-Ehrlicher Thank you very much for your great effort. The C++ container method solved my problem perfectly.
  • Window scaling on different screens.

    Unsolved
    1
    0 Votes
    1 Posts
    278 Views
    No one has replied
  • QGraphicsView fitInView doesn't do anything on restore (down)

    Solved
    15
    0 Votes
    15 Posts
    983 Views
    SGaistS
    QTimer::singleShot is a static function so there's no need to create an instance for it.
  • 0 Votes
    11 Posts
    438 Views
    D
    Ohh yes thank you so much its already solved sorry for the inconvenience caused
  • Erratic QSettings behavior

    Unsolved
    1
    0 Votes
    1 Posts
    177 Views
    No one has replied
  • setStyleSheet Unknown property backgound-color

    Unsolved
    2
    0 Votes
    2 Posts
    919 Views
    jsulmJ
    @Sandres92 backgound-color - looks like a typo (missing r). Do you have any other stylesheets with backgound-color?
  • How to convert QJsonObject to QByteArray?

    Solved
    2
    0 Votes
    2 Posts
    3k Views
    jsulmJ
    @HeerokNewbie https://doc.qt.io/qt-5/qjsondocument.html#setObject https://doc.qt.io/qt-5/qjsondocument.html#toJson
  • How to read Japanese and Korean characters?

    Solved
    10
    1 Votes
    10 Posts
    804 Views
    jsulmJ
    @harish__rajora said in How to read Japanese and Korean characters?: It takes char * as input And what encoding does it expect? ASCII, UTF16, UTF8, ...? For Japanese you have to use Unicode and that can't be represented in normal C ASCII string (char*).
  • Designate Header as x-axis in tableview model

    Unsolved
    1
    0 Votes
    1 Posts
    178 Views
    No one has replied
  • QSortFilterProxyModel mapToSource causes segfault

    Unsolved
    2
    0 Votes
    2 Posts
    564 Views
    ocgltdO
    @ocgltd I found StackOverFlow post which suggests using 'index' instead of 'createIndex' in my function. And that works. Can someone explain why? What's the difference?
  • QAbstractItemDelegate.paint seems to be called with wrong option.rect

    Unsolved
    4
    0 Votes
    4 Posts
    380 Views
    H
    @SGaist said in QAbstractItemDelegate.paint seems to be called with wrong option.rect: Just thinking quickly, shouldn't you adjust the rect position based on the index row ? In this case, images can have different aspect ratios, so I'd need ratio of each image before current one to calculate where to paint it. (It can be done, but seems to be going against design of delegate.) More importantly, values of rect seem to still affect how mouse events are handled, so even if I'd adjust paintings, selecting element's would work on offsets defined by rect and click event's wouldn't work properly. By the way, I think you should use QStyledItemDelegate as base class for your delegate since it's the default class used for the item views. Thanks for the tip!
  • Howto substring using QString

    Solved
    4
    0 Votes
    4 Posts
    8k Views
    P
    Thanks. That helped
  • How to open console window via QProcess?

    Unsolved
    8
    0 Votes
    8 Posts
    5k Views
    M
    Wanted to do something similar and found this while checking if QProcess could handle it conveniently (it can't, as seen above). Just use std::system. Doing it with QProcess just makes extra work. E.g. for the OP: #include <cstdlib> std::system("adb -s device shell"); If you want to just open a command shell, the command depends on the platform but it'd be something like: std::system("cmd"); // windows std::system("/bin/bash"); // linux, maybe osx? // etc... For that Python example above: std::system("\"C:\\Program Files\\Inkscape\\python.exe\""); // or if necessary: std::system("cmd /K \"C:\\Program Files\\Inkscape\\python.exe\""); // or if python is in the path, just: std::system("python"); PS This whole thread is a bit silly. The OP didn't want to open a shell on a phone, and there's definitely good reasons to start adb in a console window (it's a console-based interactive shell for debugging an attached Android device). The OP wanted to start it in a console window so they could continue to use it in said console window after starting it.
  • Apply rubberband in more than one data series

    Unsolved rubber band qcandlestick lineseriechart
    3
    0 Votes
    3 Posts
    726 Views
    M
    Hi SGaist , thanks for your welcome... I'm drawing these lines like this chartview=QChartView(self.__candlechart) chartview.setRubberBand(QChartView.HorizontalRubberBand) chartview.setRenderHint(QPainter.Antialiasing) lineserie1=QLineSeries() for i in self.times: lineserie1.append(QPointF(i,random.random())) pen = lineserie1.pen() pen.setWidth(3) pen.setBrush(QBrush(QColor(255,0,0))) lineserie1.setPen(pen) lineserie2=QLineSeries() for i in self.times: lineserie2.append(QPointF(i,random.random())) pen = lineserie2.pen() pen.setWidth(3) pen.setBrush(QBrush(QColor(0,0,255))) lineserie2.setPen(pen) self.__candlechart.addSeries(lineserie1) self.__candlechart.addSeries(lineserie2) If I change the order (I mean add the lines before set rubber band option I got the same result. Thanks!
  • How in Qt6 use c++ signal with argument in qml?

    Solved
    6
    0 Votes
    6 Posts
    479 Views
    SGaistS
    So my suggestion was correct ?
  • QTest Error

    Solved
    5
    0 Votes
    5 Posts
    551 Views
    I
    @SGaist Problem is solved after I added Q_DECLARE_METATYPE for my custom structures. Thank you
  • What is required to debug into qt-internals with mingw on windows 10?

    Unsolved debug debugger
    1
    0 Votes
    1 Posts
    153 Views
    No one has replied
  • QChart: How to draw text inside chart (C++)

    Unsolved
    2
    0 Votes
    2 Posts
    504 Views
    M
    Hi Rifky , I know that I' m not answering exactly to your question , but maybe this link will help you, or inspire you. The graph shown another ways to show info https://doc.qt.io/qt-5/qtcharts-donutbreakdown-example.html Bye!
  • can't find linker symbol for virtual table for `MainWindow' value

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    M
    You can also start fresh and reconfigure your project. With QtCreator closed; delete the build folder(s) and the CMakeLists.txt.user file in your project folder. Then open the project again in QtCreator.