Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.4k Posts
  • stylesheet for widgets dynamically

    Unsolved
    7
    1 Votes
    7 Posts
    1k Views
    SGaistS
    In that case, why use the style sheet at all ?
  • QT: error installing in Mac

    Unsolved
    4
    0 Votes
    4 Posts
    597 Views
    SGaistS
    Ok, then I wonder if you got a buggy archive. Can you try to install using another mirror ? You can use the QtSdkRepoChooser project for that.
  • Hide/Remove preview widget from QColumnView?

    Unsolved
    10
    0 Votes
    10 Posts
    2k Views
    R
    @SGaist When we hide() the preview widget, it will hide the widgets if something is set as preview widget. It's not preventing the columview from creating the extra column.
  • Loading two columns at start in QColumnView

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    R
    @VRonin That's Gr8. Works like a charm. Thanks much :)
  • Qt inheritance problem

    Solved
    8
    0 Votes
    8 Posts
    4k Views
    M
    @Phong said in Qt inheritance problem: @SGaist That might be the best way , thanks a lot!! BTW, how to mark the topic as SOLVED? On the bottom of your post, Topic tools,==> mark as solved [image: 466124solved.png]
  • 0 Votes
    5 Posts
    2k Views
    SGaistS
    Hi, Because paintGL is called with everything ready for your widget to execute OpenGL code. Doing it freely like that from another method means that the OpenGL context is likely not current and it might even be happening in a different thread. I'd recommend taking a look at the various OpenGL examples in Qt's documentation, you'll see that there's almost always the same pattern: everything that can be modified is stored and checked before the painting happens.
  • How I can run a terminal command from a window application?

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    SGaistS
    Great ! Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum members may know a solution has been found :)
  • QScreen::GrabWindow mouse blinking

    Solved
    10
    0 Votes
    10 Posts
    3k Views
    UndeadBlowU
    @mrjj And funny thing, I mentioned above that with screen recorder mouse blinks a little too. It was IceCream Screen Recorder. And what is funny - it is on Qt :)
  • QsslSocket - ECC Keys & Certificate fail on OSX

    Solved
    2
    2 Votes
    2 Posts
    853 Views
    dheerendraD
    I found the problem with this. Qt does not support EC Curves by default. It has dummy implemenation & does nothing. Not sure about the reason why this is left out. If you want Elliptical Curve Certificate Support on OSX with Qt, you need link Qt with OpenSSL library. This solves the problem. If any needs to help on this, do drop an email to me.
  • What does QTimer::singleShot(0, this, SLOT(SlotName))); do

    Unsolved
    8
    0 Votes
    8 Posts
    3k Views
    dheerendraD
    Super. Just move the issue to "Solved" state. It helps other. Enjoy Qt!!
  • QProgressBar Gradient Vertical QT5

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    mrjjM
    @JPannetier Well its most likely related to the actual QProgressBar and not the stylesheet. Try with a plain widget and see how that works, for test.
  • how to make example charts in QT

    Unsolved
    2
    0 Votes
    2 Posts
    482 Views
    mrjjM
    @Qt-Enthusiast [image: 42qHyC.png] Might be able to tweak http://www.qcustomplot.com/ to do it but it seems it has no such 3d type bars. If you can use newer Qt there is http://doc.qt.io/qt-5/qtdatavisualization-bars-example.html
  • Widget always on top

    Unsolved
    5
    0 Votes
    5 Posts
    2k Views
    QT-static-prgmQ
    i just thought about that problem and did some research. I found out that i need to "hack" the d3d9 file for directx9. But that way i need to do a hack for each DirectX version and OpenGL. And i think there is an easier way. Look at the GeforceExperience Overlay. It doesn't only work on Games, it even works on the desktop. So does anybody know how they did that??
  • Render into a frame buffer with 2 color buffer attached to (OpenGL)

    Unsolved
    1
    0 Votes
    1 Posts
    571 Views
    No one has replied
  • Element color in custom style

    Solved style qproxystyl qstyle painter color
    3
    0 Votes
    3 Posts
    2k Views
    gabodevG
    @mrjj Thank you very much! I have researched and been able to do what I was looking for. Here's what I did: def drawPrimitive(self, element, opt, painter, widget): if element == QStyle.PE_PanelButtonTool: pressed = (opt.state & STATE_SUNKEN | opt.state & STATE_ON) color = QColor("#323232") if pressed: color = QColor("#222222") elif opt.state & STATE_ENABLED and opt.state & STATE_MOUSEOVER: color = QColor("#4e4e4e") painter.fillRect(opt.rect, color) elif element == QStyle.PE_IndicatorArrowDown or \ element == QStyle.PE_IndicatorArrowUp: r = opt.rect size = min(r.height(), r.width()) image = QImage(size, size, QImage.Format_ARGB32_Premultiplied) image.fill(Qt.transparent) image_painter = QPainter(image) image_painter.setPen(QColor("#bdbfc0")) image_painter.setBrush(QColor("#bdbfc0")) polygon = QPolygon() polygon.append(QPoint(0, r.width() * 0.5)) if element == QStyle.PE_IndicatorArrowDown: polygon.append(QPoint(size, size * 0.6)) polygon.append(QPoint(size / 2, size * 0.1)) else: polygon.append(QPoint(size, size * 0.5)) polygon.append(QPoint(size / 2, size * 0.9)) image_painter.drawPolygon(polygon) image_painter.end() pixmap = QPixmap.fromImage(image) painter.drawPixmap(r.x() + (r.width() - size) / 2, r.y() + (r.height() - size) / 2, pixmap) else: QProxyStyle.drawPrimitive(self, element, opt, painter, widget) Regards!
  • The features of Qt for Windows, iOS and Android platforms

    Unsolved
    9
    0 Votes
    9 Posts
    3k Views
    tomyT
    OK, thank you. I made the decision. I choose that book for Windows and the other for other platforms.
  • Set value from SpinBox to variable

    Solved
    20
    0 Votes
    20 Posts
    7k Views
    SGaistS
    No, not by calling the slot like that, by retrieving the currently selected item and if there's one then apply the logic you want to build the command. And you can also make command a locale variable.
  • Anybody ever install commercial Qt license on Jenkins?

    Unsolved
    10
    0 Votes
    10 Posts
    4k Views
    SGaistS
    Why make it an admin user ? Wouldn't a standard one make do ? Add support for configuring where the license file is ? Sounds good.
  • Cant build files

    Unsolved
    24
    0 Votes
    24 Posts
    6k Views
    SGaistS
    Are you adding files with spaces in the path ?
  • Windows HTML MIME

    Solved
    2
    0 Votes
    2 Posts
    515 Views
    UndeadBlowU
    Ok, problem was HTML in Windows, not Qt. More precisely speaking, Chrome on Windows process HTML correctly only if HTML is inside <html><body></html></body>. On Linux works without it.