Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.9k Posts
  • Application icon for linux

    2
    0 Votes
    2 Posts
    10k Views
    C
    I think it is adequately covered in the documentation under "Setting the Application Icon":http://qt-project.org/doc/qt-4.8/appicon.html and referenced "standards." The only part lacking is suggested location for the desktop files: Per-user location for the desktop file is typically ".local/share/applications" System wide "/usr/share/applications/". Your assessment is correct. The desktop icon on Linux is not part of the executable. It isn't for OS X either, it's just that the mechanism is standard so installing the separate file into the application bundle is easily automated. On Linux your installer (or application on first start) needs to take care of this based on the environment presented to it. On all platforms the desktop icon has no direct relationship to the application window icon. QApplication::setWindowIcon() works on all three desktop platforms.
  • QStyleOptionProgressBar looks inactiva on OSX

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • QGraphicsScene: QGraphicsItem with clickable Icons and appearing widgets

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • [SOLVED] setItemDelegate does not seem to work

    7
    0 Votes
    7 Posts
    7k Views
    S
    Setting the ItemIsEditable flag for the column in the model was the missing step. Thanks for pointing it out.
  • How to force painting of a widget?

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • [SOLVED] Change horizontal header (title of colums) in QTableView

    3
    0 Votes
    3 Posts
    10k Views
    S
    [quote author="Lukas Geyer" date="1337528339"]"setHeaderData()":http://qt-project.org/doc/qt-4.8/qsqlquerymodel.html#setHeaderData. See "also":http://qt-project.org/doc/qt-4.8/qsqlquerymodel.html#details.[/quote] I was looking for it in QTableView :-/ Thank you
  • [SOLVED] Qt Creator Widget plugin: strange linker error

    13
    0 Votes
    13 Posts
    7k Views
    S
    Ahhh... Finally! Projects, have to be rebuilt after any changes applied to any of libraries they linked against. Though I thought this is only true for statically linked libraries... I learned this today :)
  • My first program in QT

    35
    0 Votes
    35 Posts
    19k Views
    W
    @1+1=2 As far as I understand, p3aul knows and understands C++. Furthermore, while Qt doesn't require user to be a C++ expert, you'd better be one.
  • Opengl contexts agl, wgl, glx

    5
    0 Votes
    5 Posts
    5k Views
    P
    Thank you, but I have decided for a QGLWidget.
  • When Will Qt 5 release version will be released ?

    6
    0 Votes
    6 Posts
    5k Views
    sierdzioS
    No, Lars talks about a standard Qt library release. Preparing the SDK usually takes a bit longer. But who knows, maybe Nokia will change that for such an occasion as new major release.
  • [SOLVED] How to fill a QRect and remove a smaller QRect out of it?

    2
    0 Votes
    2 Posts
    4k Views
    J
    OK it seems I found the solution: @ surface = self.parent().geometry() self.setGeometry(surface) path = QtGui.QPainterPath() path.setFillRule(QtCore.Qt.OddEvenFill) path.addRect(QtCore.QRectF(surface)) path.addRect(QtCore.QRectF(self.parent().rubberband.geometry())) self.painter.begin(self) self.painter.setBrush(QtGui.QBrush(QtGui.QColor(100, 100, 100, 70))) self.painter.setPen(QtGui.QPen(QtGui.QColor(0, 0, 0, 80))) self.painter.drawPath(path) self.painter.end()@ Although I wonder whether this is the simplest solution? I'm surprised QPainter does not has a fill mode that allows to invert or exclude an area.
  • Qt Quick Application and Mobile Qt Application - what's the difference?

    3
    0 Votes
    3 Posts
    1k Views
    P
    What to choose to programming on mobile devices? (Not only cell phones, but also tablets) ?
  • QWidget.hide() interrupts mouseMoveEvent()

    2
    0 Votes
    2 Posts
    2k Views
    J
    For now I have worked around this "bug" by creating a QWidget and reimplementing its paintEvent() with a forked option (either fillRect() or pass) and forcing an update() whenever changes are required. It might even be a better idea than using hide() / show(). Or isn't it?
  • Qmake version format for libraries

    4
    0 Votes
    4 Posts
    4k Views
    C
    Feel free to rename the library file and ignore the symlinks in your install script. Or, write a short shell script that renames and creates the desired links. Have it called after linking with: @QMAKE_POST_LINK = ./post_link_script.sh $$quote($(TARGET)) @ @#!/bin/bash TARGET_X_Y_Z=${1} TARGET_X_Y=${TARGET_X_Y_Z%.} TARGET_X=${TARGET_X_Y%.} TARGET=${TARGET_X%.*} rm $TARGET_X_Y $TARGET_X $TARGET mv $TARGET_X_Y_Z $TARGET ln -s $TARGET $TARGET_X@
  • Map QTextCursor to item coordinates in QGraphicsTextItem

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Dynamically resize qtreewidget item

    2
    0 Votes
    2 Posts
    3k Views
    S
    Are you using a custom delegate? You can subclass QStyledItemDelegate and override the paint() function and sizeHint() function.
  • [SOLVED] setContentsMargins() not working?

    3
    0 Votes
    3 Posts
    5k Views
    J
    It works thanks :)
  • Control QMenu/QAction icon location

    4
    0 Votes
    4 Posts
    3k Views
    W
    [quote author="Rahul Das" date="1337314090"]I haven't tried, but what happens if you set the alignment of the text to Right?[/quote] Good idea, unfortunately it didn't work. It seems crazy that this isn't customizable, but I'm thinking I might just have to use QWidgetAction and lay things out myself.
  • How do?right click menu for each QTreeWidget Item

    3
    0 Votes
    3 Posts
    12k Views
    I
    You also need to set @ treeWidget->setContextMenuPolicy(Qt::ActionsContextMenu); @ If you need to have different context menu for some of the items in the tree, you need to connect the itemSelectionChanged() signal to a slot where you remove/adds actions according to your needs.
  • [Solved] PyQt v4.7

    2
    0 Votes
    2 Posts
    1k Views
    N
    Nevermind, found a backup :)