qtgui

    2熱度

    1回答

    我試圖按字母順序對QStandardItemModel的特定列中的項進行排序。 爲此,我現在用的是從QSortFilterProxyModel派生的類,我重新實現lessThan方法,例如 bool MyProxy::lessThan(const QModelIndex &left, const QModelIndex &right) const { QVariant le

    1熱度

    1回答

    我從這裏給出的一個堆棧溢出的例子中創建了一個非常簡單的C++ QT控制檯應用程序。 How to use QFileSystemWatcher to monitor a folder for change 的代碼是完全一樣的在應用程序的代碼,我用Qt的用戶界面,Qt Creator的使用MinGW 32位發展。我從我可以選擇的項目中選擇控制檯應用程序,因爲我不需要圖形用戶界面。應用程序加載完成後,

    1熱度

    2回答

    我想從.ini文件爲我的hello-world QT + C++程序動態創建接口。 1步驟我用QSettings讀取設置文件 - 這很簡單。 2步驟我試着畫出接口: //i == 5; for(int temp=1;temp <= i;temp++){ QString tName = settings.value("/Level" + QString::number(temp) + "

    1熱度

    1回答

    我正在使用PyQt4創建一個窗體,使用Qlabel在單獨的窗口中顯示基於Web的圖像。應該是單擊表單上的按鈕,通過從窗體上的表格單元格中讀取新圖像URL,使用新圖像更新Qlabel。 我認爲我遇到的問題是不理解如何創建Qlabel作爲類對象,然後通過設置setPixmap()屬性進行更新。這是我到目前爲止已經寫的: import sys from PyQt4.QtGui import * fr

    4熱度

    2回答

    在隱藏網格的同時,在QCustomPlot中是否有任何顯示零點的方法?我試圖用以下行隱藏網格: ui->customPlot->xAxis->grid()->setVisible(false); ui->customPlot->yAxis->grid()->setVisible(false); 但是這也隱藏了zerolines。我需要保持可見的zerolines。

    1熱度

    3回答

    我已存儲在本地板目錄(/home/images/system/image.png)圖像 爲painter.drawimage函數傳遞Qpoint和QImage的作爲參數。 painter.drawImage(QRect(100, 50, 100, 100), QImage("home/images/system/image.png")); 我可以在這裏直接使用路徑嗎?如果我像這樣加載它不工作

    4熱度

    2回答

    在Debian上構建Qt應用程序時遇到問題。 當我嘗試編譯任何東西,我得到: /usr/bin/ld: cannot find -lGL collect2: error: ld returned 1 exit status make: *** [test] Error 1 14:38:52: Proces "/usr/bin/make" zakończył się kodem wyjściowym

    2熱度

    1回答

    如何打開像png文件一樣的svg文件。 例如它適用於PNG文件: scene=new QGraphicsScene(QRect(10, 10, 680, 520)); view=new QGraphicsView(this); image=new QGraphicsPixmapItem(QPixmap("example.png")); scene ->addItem(image); vi

    2熱度

    2回答

    我是PySide的新手。我遇到一個問題:一個新的QMainWindow閃過,消失了,當我觸發從另一個QMainWindow中(主界面)。這裏一的QAction我張貼的示例代碼來說明上面: class MainWindow(QtGui.QMainWindow): def __init__(self, parent = None): super(MainWindow, self)

    2熱度

    1回答

    我在使用外部庫時遇到麻煩,讓我們從頭開始。我有一些庫trans2quik,由3個文件組成:trans2quik .dll/.lib/.h 因此,我使用Qt5.2,MSVC 2012 x64,win7。我使用「添加庫」嚮導創建簡單的qt窗口小部件應用程序和鏈接庫,用於在我的pro文件中生成LIBS,INCLUDEPATH等。然後,當我調用任何功能,我得到懸而未決extenal符號錯誤: widget