Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • How to use scrollbar in QListView

    6
    0 Votes
    6 Posts
    2k Views
    SGaistS
    Indeed ! Detail I forgot, the QFileSystemModel is threaded
  • 0 Votes
    2 Posts
    838 Views
    SGaistS
    Hi, Can you show a simple code sample that allows to reproduce this ?
  • QScroller not working on multiple widgets?

    6
    0 Votes
    6 Posts
    2k Views
    A
    It doesn't work that way,
  • Advice on Integrating Camera + Video Processing

    1
    0 Votes
    1 Posts
    767 Views
    No one has replied
  • I need a struct or something similar to it but what and how?

    14
    0 Votes
    14 Posts
    3k Views
    A
    no this is not true. only the main table is used by all companies. but the data that a company can access is different then the another one and also is it can have the same products but with different price and also the same company can raise the price.. but for an old transaction it have not to make that change. for this reason I have the company table and also the client table.. even if a company decided to have a price for one client and another price for another one.. the individual price will be saved on client database. the tables are different and also the content.
  • Support For .XAML files in Qt

    4
    0 Votes
    4 Posts
    2k Views
    A
    I guess you need to use Windows and something like "this article explains":http://www.codeproject.com/Articles/422523/Convert-XAML-Vector-Graphic-to-PNG or tools like "xcon":http://xcon.sourceforge.net/
  • Bug? - Moving QFrame - not working when setVisible(false)

    3
    0 Votes
    3 Posts
    2k Views
    M
    How my QFrame is created : @ //// ---------------------- Test Achievement Window -------------------------- frameAchievement = new QFrame(ui->widget_allSpeedo); frameAchievement->setAttribute(Qt::WA_TransparentForMouseEvents,true); frameAchievement->setFocusPolicy(Qt::NoFocus); frameAchievement->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); frameAchievement->setFixedSize(250, 150); frameAchievement->setObjectName("frameAchievement"); frameAchievement->setStyleSheet("QFrame#frameAchievement { background-color : rgba(1,1,1,240); " "border: 4px solid gray; }" "QLabel { color: white; }"); QGridLayout *gridAchievement = new QGridLayout(frameAchievement); QFont fontBold; fontBold.setPointSize(10); fontBold.setBold(true); labelIcon = new QLabel(frameAchievement); labelIcon->setMinimumHeight(64); labelIcon->setMaximumHeight(64); labelIcon->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); labelIcon->setObjectName("labelIcon"); labelIcon->setStyleSheet("image: url(:/image/icon/trophy)"); QLabel *labelAchievementReceived = new QLabel(frameAchievement); labelAchievementReceived->setMinimumHeight(20); labelAchievementReceived->setMaximumHeight(20); labelAchievementReceived->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); labelAchievementReceived->setAlignment(Qt::AlignBottom | Qt::AlignRight); labelAchievementReceived->setAttribute(Qt::WA_TransparentForMouseEvents,true); labelAchievementReceived->setText(tr("New Achievement!")); labelAchievementReceived->setFont(fontBold); labelAchievementName = new QLabel(frameAchievement); labelAchievementName->setMinimumHeight(20); labelAchievementName->setMaximumHeight(20); labelAchievementName->setMaximumWidth(400); labelAchievementName->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); labelAchievementName->setAlignment(Qt::AlignBottom | Qt::AlignRight); labelAchievementName->setAttribute(Qt::WA_TransparentForMouseEvents,true); labelAchievementName->setText(tr("Name here!")); labelAchievementName->setFont(fontBold); gridAchievement->addWidget(labelIcon, 0, 0, 2, 1); gridAchievement->addWidget(labelAchievementReceived, 0, 1); gridAchievement->addWidget(labelAchievementName, 1, 1); QGridLayout *glayout = static_cast<QGridLayout*>( ui->widget_allSpeedo->layout() ); glayout->addWidget(frameAchievement, 0, 0, 0, 0); frameAchievement->setAttribute(Qt::WA_TransparentForMouseEvents,true); timerRemoveAnimation = new QTimer(this); timerAnimationCompleted = new QTimer(this); connect (timerRemoveAnimation, SIGNAL(timeout()), this, SLOT(removeAchievementAnimation()) ); connect (timerAnimationCompleted, SIGNAL(timeout()), this, SLOT(lastAchievementAnimationDone()) ); achievementCurrentlyPlaying = false; firstTimePlayAchievement = true; /// Hide achievement window /// Not working to move position manually here.. // frameAchievement->setVisible(true); // QPoint currentPoint = frameAchievement->pos(); // frameAchievement->setProperty("pos", QPoint(currentPoint.x()-250, currentPoint.y())); frameAchievement->setVisible(false); @
  • Setting up UI for movie player

    3
    0 Votes
    3 Posts
    903 Views
    A
    How can I set up the button shapes like d shape of picture viewer..it there any widget similar to it?
  • 0 Votes
    3 Posts
    1k Views
    N
    Hello Hasmik, I found in qtbase/src/widgets/styles/qmacstyle_mac.mm line 2066 (Qt 5.3.1) that it defaults to large icon size: @ case PM_ToolBarIconSize: ret = proxy()->pixelMetric(PM_LargeIconSize); break; @ But I noticed that it uses the proxy() so my own fix was to make a custom QProxyStyle that uses PM_SmallIconSize instead: @ #include <QProxyStyle> class MacStyle : public QProxyStyle { public: MacStyle() : QProxyStyle("Macintosh") { } int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, const QWidget * widget = 0) const { if (metric == PM_ToolBarIconSize) { return proxy()->pixelMetric(PM_SmallIconSize); } return QProxyStyle::pixelMetric(metric, option, widget); } }; @ Then right before creating the QApplication you would do: @ QApplication::setStyle(new MacStyle); @
  • How to create a QImage from an average of ten others

    5
    0 Votes
    5 Posts
    2k Views
    A
    [quote author="Jeroentje@home" date="1408540940"]Just for my curiosity, but what do you mean with average of 10 images?[/quote] 10 frames captured on command from streaming video, each frame converted to QImage.
  • 0 Votes
    5 Posts
    2k Views
    S
    https://bugreports.qt-project.org/browse/QTBUG-40863
  • 0 Votes
    8 Posts
    2k Views
    B
    Yes, I could provide a small Python/PyQt app + qt_pt.qm. The app would display a QErrorMessage of type Debug, whose translation is also bad (it's not just the Mac application menu, and not just on OSX.) But is that necessary, since if it it looks wrong in Linguist on any platform, one can say it is a wrong translation? Example: open Qt Linguist on qt_pt.ts from the repository. Look at the source text "Debug Message" in the context "QErrorMessage". The translated text wrongly has capital letters in the middle of words (which I think is wrong in most words of most Latin languages, except for proper names like McTavish.) (This example would rarely be noticed. The example for the MAC_APPLICATION_MENU context is more important.) It's not just the Portuguese translation either, there are examples in the French translation.
  • [SOLVED] Matrix division

    7
    0 Votes
    7 Posts
    2k Views
    A
    I found also a performance test comparing diferent libraries and the armadillo looks like one of the bests, so i will try it. Ok thanks so much for help me!
  • QComboBox confusion

    3
    0 Votes
    3 Posts
    826 Views
    Chris KawaC
    Something like this should work: @ ui->comboBox->setEditable(true); ui->comboBox->setInsertPolicy(QComboBox::NoInsert); connect(ui->comboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), [=](int index){ emit setZoom(getZoomFromText(ui->comboBox->itemText(index))); }); connect(ui->comboBox->lineEdit(), &QLineEdit::returnPressed, ={ emit setZoom(getZoomFromText(ui->comboBox->lineEdit()->text())); }); @ Edit ups, too slow :)
  • Qt5.1: Return a list of available QML types

    2
    0 Votes
    2 Posts
    640 Views
    p3c0P
    Hi, May be you should have a look at what qmlplugindump does.
  • Build error but no error message

    2
    0 Votes
    2 Posts
    641 Views
    K
    You did not give an alternative text while embedding the picture. I have fixed this for you.
  • Qt Creator on the Mac

    6
    0 Votes
    6 Posts
    2k Views
    B
    Brian: I use Qt creator on osx, ubuntu (both native and virtualbox on my mba), and windows (likewise native/ vbox+mba). All work fine, just be aware of the keyboard awkwardness. I also use pycharm extensively on all platforms as well - also works great, but I have put a little effort into configuring both creator and pycharm to have somewhat related keymaps. -bms20
  • Example Web API w Qt5.3

    2
    0 Votes
    2 Posts
    1k Views
    dheerendraD
    Welcome to the forum. Did you a get a chance to look at webkitswidgets examples under 'examples' directory of Qt installation ?
  • Qprinter take receipt

    9
    0 Votes
    9 Posts
    3k Views
    SGaistS
    Then you should ask the status of this on the bug report
  • Weird crash with QSystemTrayIcon on OSX

    11
    0 Votes
    11 Posts
    3k Views
    SGaistS
    I don't know, I don't work for Digia, however you can find information about the CI "here":http://qt-project.org/wiki/CI_Overview But like I said, test with the 64 bit prebuilt package. Creating a minimal compilable example that reproduce the behavior will help creating a patch.