Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.4k Posts
  • 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
    516 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.
  • Treeview using SQL Query

    Unsolved
    2
    0 Votes
    2 Posts
    570 Views
    dheerendraD
    Try hitting google for this. You have few set of examples to solve your issue.
  • How to use a QWinJumpList?

    Solved
    2
    0 Votes
    2 Posts
    894 Views
    mrjjM
    hi Sample must be old Try this #include <QWinJumpList> #include <QWinJumpListItem> #include <QWinJumpListCategory> // ADD QT += winextras to .pro file int main(int argc, char* argv[]) { QApplication a(argc, argv); QWinJumpListItem jumpItem(QWinJumpListItem::Link); jumpItem.setArguments(QStringList(QString("as"))); jumpItem.setDescription("Some Text"); jumpItem.setTitle("MY LITTLE JUMP LIST"); QWinJumpList jumpList; jumpList.tasks()->setTitle("Some Title"); jumpList.tasks()->addItem(&jumpItem); jumpList.tasks()->setVisible(true); MainWindow w; w.show(); return a.exec(); } [image: MG0JLI.png]
  • 0 Votes
    3 Posts
    2k Views
    mrjjM
    Also we must ask: Did you go and download Visual Studio 2013 from ms or had it installed already? The compiler is not included in the Qt download. when it has VS2XXX in its name. Alternativ Use the mingw Qt instead. it has compiler included. https://download.qt.io/archive/qt/5.8/5.8.0/qt-opensource-windows-x86-mingw530-5.8.0.exe
  • QGraphicsScene remove item selectively

    Solved
    3
    0 Votes
    3 Posts
    1k Views
    gfxxG
    I struggled a bit 'to understand online documents ... that's why I looked for help .... but in the end I did it: These code solve the problem (remove only the item with zvalue from 46 to 54): void MainWindow::test_selective_clean() { QList<QGraphicsItem*> citem = scene_Pallet->items(); for (int ct = 0; ct < citem.size(); ct++) { if ((citem[ct]->zValue() > 45) && ((citem[ct]->zValue() < 55))) { scene_Pallet->removeItem(citem[ct]); } } } I hope these help someone in future. regards Giorgio
  • https nodejs server resolve wrong body data from QHttpMultiPart

    Unsolved
    1
    0 Votes
    1 Posts
    308 Views
    No one has replied
  • http Multi part file upload via post request doesn't work in Windows

    Unsolved
    9
    0 Votes
    9 Posts
    3k Views
    F
    In my case I had processEvents() function called in uploadProgress function. When I get rid of it the problem was solved.
  • Proper way to restore state/geometry on application start?

    Solved
    3
    0 Votes
    3 Posts
    1k Views
    P
    brilliant! that seems to work well. thank you!
  • QGraphicsItem resize

    Unsolved
    17
    0 Votes
    17 Posts
    13k Views
    W
    Thank you Asperamanca, your hint with using mouse move instead of ItemChange works fine: void ResizeItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event){ if( event->buttons() & Qt::LeftButton){ // If Leftbutton pressed QPointF delta = parentItem()->mapToParent(event->pos())-parentItem()->pos()-mouse_pos_parent_coords; parentItem()->moveBy(delta.x(), delta.y()); return; } QGraphicsItem::mouseMoveEvent(event); } void ResizeItem::mousePressEvent(QGraphicsSceneMouseEvent *event){ mouse_pos_parent_coords = event->pos(); QGraphicsItem::mousePressEvent(event); } If somebody know, why it does not work to use ItemChange I will happy to know it :)
  • "unsupported qtquick version" in QT Creator 4.2.1 using QtQuick 1.0

    Unsolved
    3
    0 Votes
    3 Posts
    921 Views
    P
    I grabbed qtquick1-opensource-src-5.5.1.tar.gz, built and installed it. It seems to work for the most part, just not in QT Creator.
  • QT 4.8.2

    Unsolved
    2
    0 Votes
    2 Posts
    674 Views
    mrjjM
    @PalakB said in QT 4.8.2: QAbstractNativeEventFilter Hi Docs says Header: #include <QAbstractNativeEventFilter> qmake: QT += core Since: Qt 5.0 So i guess its a no.
  • Offsetting the tab in QTabWidget

    Solved
    17
    0 Votes
    17 Posts
    5k Views
    P
    Thanks a lot. :)
  • Transferring project from qt to visual studio

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    M
    ok i was able to figure it out. If anyone find this the issue is that the ui which pop ups in the qt designer has to have that specific name. Such as i had to have a plot that says customplot or it would give me an error. Also when switching over it is best to take out qcustomplot.h and qcustomplot.cpp and just link the whole folder