Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • What are the negative MIB values returned by QTextCodec::availableMibs()?

    Solved
    3
    0 Votes
    3 Posts
    581 Views
    DiracsbracketD
    @SGaist said in What are the negative MIB values returned by QTextCodec::availableMibs()?: They are defined here. Thanks!
  • Problem with Query - QODBC, Informix

    Solved qodbc informix query
    15
    0 Votes
    15 Posts
    7k Views
    E
    @mrjj thank you still
  • Extract data from QModelIndex

    Solved qmodelindex qmodelindexlist
    3
    0 Votes
    3 Posts
    2k Views
    UnitScanU
    @mrjj yes, thank you!
  • Rendering programmatically generated data

    Unsolved
    3
    0 Votes
    3 Posts
    521 Views
    mrjjM
    Hi While a custom Widget with a paintEvent is the right way, there is also the alternative to paint on pixmap and show the image on a QLabel. Note that you are only allowed to paint on an image this way. Painting directly to screen will not work. Has to be inside paintEvent then. void MainWindow::on_pushButton_released() { int h = ui->label->height(); int w = ui->label->width(); QPixmap pix(w, h); QPainter paint(&pix); pix.fill( Qt::white ); paint.setPen(QColor(0, 0, 0, 255)); int y = 0; int x = 0; int bw = 10; // bar width for (int barcount = 0; barcount < 12; ++barcount) { paint.setBrush(QColor(255 - x, 34 + x, 255, 255)); paint.drawRect(x, h - GetBarHeight(h), bw, h ); x += bw + 4; } paint.end(); ui->label->setPixmap(pix); } [image: RWjVnF.png]
  • Determine whether widget value was changed by user or by software?

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    J
    Thank you for your excellent suggestions. For the time being, 'hasFocus' solves my problem.
  • QWizard instanciation crashes on Windows 10 x64

    Solved
    6
    0 Votes
    6 Posts
    967 Views
    SGaistS
    Qt 4.3 is 11 years old so if you want to try to make it run on Windows 10, then you have to rebuild it yourself. Note that the Qt 4 series has reached end of life so you should consider updating to Qt 5 as quickly as possible.
  • Need to implement Print Dialog Box

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    mrjjM
    @Piyush Hi Its the same as here https://forum.qt.io/topic/87293/how-to-print-the-current-tab-on-pressing-a-push-button Screen is normally maybe 1920x1080 pixels where as printer might be 9000 x 9000 pixels So if you have an image of 200x200 on screen it look ok big. But if you print it. then 200 pixels out of 9000 looks like the size of a stamp. https://en.wikipedia.org/wiki/Dots_per_inch
  • Stylesheet: background-image size relative to widget while keeping aspect ratio

    Unsolved
    11
    0 Votes
    11 Posts
    10k Views
    qwasder85Q
    @JonB Doesn't look like it. It seems to have no effect.
  • GUI

    Moved Unsolved
    4
    0 Votes
    4 Posts
    786 Views
    R
    Thanks, I will try with QProcess
  • 0 Votes
    3 Posts
    888 Views
    jsulmJ
    @Mike5500 You should start here https://doc.qt.io/qt-5.10/qtnetwork-index.html Examples: http://doc.qt.io/qt-5/examples-network.html
  • display a huge horizontal dataset in a QScrollingView

    Unsolved
    9
    1 Votes
    9 Posts
    1k Views
    JonBJ
    @sierdzio OK, sorry, I completely misunderstood which bitmaps we were talking about...!
  • Items in QGraphicsScene are not movable

    Solved
    23
    0 Votes
    23 Posts
    10k Views
    faiszalkhanF
    I had previously given a static bounding rect value as the previous implementation was static. Now that the value is dynamic I had not changed the contents of the bounding rect as the size has not changed from the previous implementation. Making the changes in the bounding rect solved the problem. Thanks a lot to @mrjj @sanojsubran @SGaist !
  • How to get value of a particular cell in QTableWidget on double clicking?

    Unsolved
    2
    0 Votes
    2 Posts
    2k Views
    jsulmJ
    @Piyush Check the documentation http://doc.qt.io/qt-5/qtablewidget.html#itemDoubleClicked You get the double clicked item as signal/slot parameter: void QTableWidget::itemDoubleClicked(QTableWidgetItem *item) This does not make any sense: self.ui.tableWidget.itemDoubleClicked.values() You should have your slot connected to this signal: def onItemDoubleClicked(self, item): pass
  • QSql fetching smaller data set

    Solved
    2
    0 Votes
    2 Posts
    410 Views
    jsulmJ
    @Ankit.Jain Use http://doc.qt.io/qt-5/qsqlquery.html#size QSqlRecord returned by record() is something different, see http://doc.qt.io/qt-5/qsqlquery.html#record http://doc.qt.io/qt-5/qsqlrecord.html#count "Returns the number of fields in the record."
  • 3D scatter how to update new points and remove old one

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    V
    @mrjj I got it working. So the removeSeries works i did it like this now: scatter.removeSeries(prevseries); series->dataProxy()->addItems(data); scatter.addSeries(series); data.clear(); prevseries = series; this works now it deletes the previous data, I also set the program to 1fps haven't tried putting it faster but it works now. Thanks for your help
  • Crash in qDrawBorderPixmap() called from QComboBox when selecting Item in QTreeView

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    SGaistS
    Then you should get more data about the machine that makes your application crash. Things like, OS version, if there are other Qt applications on it, graphics card, driver version. You can provide them with the qtdiag application so you can grab some intel about the machine.
  • 2's complement convertion

    Solved complement two convert bit string
    2
    0 Votes
    2 Posts
    2k Views
    JKSHJ
    @GhostWolf said in 2's complement convertion: uint32_t test2 = (unit.value(1)<<16) | unit.value(0); Just store the result as a signed integer (int32_t) instead of unsigned (uint32_t). You don't need to change the bit pattern (0b11111111_11111111_11111111_11111111). Interpreting this pattern as Unsigned gives you ‭4294967295 Interpreting this pattern as Signed gives you -1.
  • I'm going crazy because of Mac OSX and Qt!

    Unsolved
    18
    0 Votes
    18 Posts
    4k Views
    SGaistS
    Strange indeed. Oh well, the essential is that you have it working now.
  • Can't download HTML of website

    Solved
    2
    0 Votes
    2 Posts
    429 Views
    Pablo J. RoginaP
    @El3ctroGh0st three things here. What happens with my network-based application? Wireshark is always your friend to know exactly what your application is sending/receiving from/to the network. Regarding parent is an unused parameter, try using the parent you receive in the constructor into the QObject constructor: XMLParser(QUrl link, QObject *parent = 0) : QObject(parent), downloadLink(link) {} Try not to hijaack the topic of your post with several subjects inside it :-) You started with the network issue, but you have the parent issue as well
  • Qt resource overflow. Highly annoying. How to fix?

    Unsolved
    18
    0 Votes
    18 Posts
    4k Views
    S
    @JKSH said in Qt resource overflow. Highly annoying. How to fix?: QT_X11_NO_MITSHM=1 Setting this appears to work around the issue indeed! (However, I had to reboot quite often the last days, thus my sessions didn't get that monstrous. So this is yet preliminary impression.) Another thing that I haven't yet verified is the impression that when I set the Konsole scrollback buffer from 10k to 50k lines, the problem set on quicker. I'll verify this with even larger values, with both QT_X11_NO_MITSHM set and not set. Here the link to the bugreport I forgot (includes other links, too): https://bugreports.qt.io/browse/QTBUG-65681 I'll report back when I tested and found out whether this affects KDE 5, too. Thank you Qt guys again for your great help :) Have a nice day!