Nieuws:

We zijn er weer.

Na lange tijd van afwezigheid zijn we er weer  :laugh:
We hebben alle wachtwoorden gereset, je oude wachtwoord werkt niet meer.Je moet via het "wachtwoord vergeten"-linkje je wachtwoord resetten. Je krijgt hiervoor een mailtje op het adres dat je bij ons geregistreerd hebt.

De komende tijd zijn we nog druk bezig om de rest van de site op te bouwen, dus het kan zijn dat sommige onderdelen (tijdelijk) niet werken.

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: QT4.4.3 mainWidget setCentralWidget  (gelezen 2142 keer)

Offline Koen Bokern

  • Lid
  • Steunpunt: Nee
QT4.4.3 mainWidget setCentralWidget
« Gepost op: 2009/01/03, 16:49:20 »
Hallo,

Ik probeer vidiqatch geheel overnieuw te maken (met enkele oude codes die ik eventueel aanpas). Echter na de GUI gedesigned te hebben, krijg ik een AttributeError van setCentralWidget. Kan dit liggen aan de versies?

koen@solar:~/Bureaublad/vidiqatch_2.0_dev$ pyuic4 --version
Python User Interface Compiler 4.4.3 for Qt version 4.4.1

<ui version="4.0" >
 <author>Koen Bokern &lt;vlerkknozem@gmail.com></author>
 <class>MainWindow</class>
 <widget class="QMainWindow" name="MainWindow" >
  <property name="geometry" >
   <rect>
    <x>0</x>
    <y>0</y>
    <width>805</width>
    <height>418</height>
   </rect>
  </property>
  <property name="sizePolicy" >
   <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
    <horstretch>0</horstretch>
    <verstretch>0</verstretch>
   </sizepolicy>
  </property>
  <property name="windowTitle" >
   <string>Vidiqatch</string>
  </property>
  <property name="statusTip" >
   <string/>
  </property>
  <widget class="QWidget" name="centralwidget" >
   <layout class="QGridLayout" name="gridLayout" >
    <item row="0" column="0" colspan="3" >
     <widget class="QWidget" native="1" name="videoframe" >
      <property name="sizePolicy" >
       <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
      <property name="mouseTracking" >
       <bool>true</bool>
      </property>
      <property name="styleSheet" >
       <string notr="true" >background-color: #D1D1D1; border: 2px #666666;</string>
      </property>
      <layout class="QGridLayout" name="gridLayout_3" />
     </widget>
    </item>
    <item row="0" column="3" colspan="3" >
     <widget class="QTabWidget" name="tabWidget" >
      <property name="sizePolicy" >
       <sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
      <property name="currentIndex" >
       <number>0</number>
      </property>
      <widget class="QWidget" name="tab" >
       <attribute name="title" >
        <string>Playlist</string>
       </attribute>
       <widget class="QTreeWidget" name="tree_playlist" >
        <property name="geometry" >
         <rect>
          <x>9</x>
          <y>9</y>
          <width>419</width>
          <height>227</height>
         </rect>
        </property>
        <column>
         <property name="text" >
          <string>Media</string>
         </property>
        </column>
        <column>
         <property name="text" >
          <string>Time</string>
         </property>
        </column>
       </widget>
       <widget class="QPushButton" name="pushButton" >
        <property name="geometry" >
         <rect>
          <x>9</x>
          <y>242</y>
          <width>136</width>
          <height>28</height>
         </rect>
        </property>
        <property name="text" >
         <string>Clear playlist</string>
        </property>
       </widget>
       <widget class="QPushButton" name="pushButton_2" >
        <property name="geometry" >
         <rect>
          <x>151</x>
          <y>242</y>
          <width>135</width>
          <height>28</height>
         </rect>
        </property>
        <property name="text" >
         <string>Save playlist</string>
        </property>
       </widget>
       <widget class="QPushButton" name="pushButton_3" >
        <property name="geometry" >
         <rect>
          <x>292</x>
          <y>242</y>
          <width>136</width>
          <height>28</height>
         </rect>
        </property>
        <property name="text" >
         <string>Load playlist</string>
        </property>
       </widget>
      </widget>
      <widget class="QWidget" name="tab_2" >
       <attribute name="title" >
        <string>Search</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout_2" >
        <item row="0" column="0" colspan="2" >
         <widget class="QLabel" name="label_2" >
          <property name="text" >
           <string>Searchengine</string>
          </property>
         </widget>
        </item>
        <item row="0" column="2" >
         <widget class="QComboBox" name="searchengine" />
        </item>
        <item row="1" column="0" colspan="3" >
         <widget class="QTreeWidget" name="tree_search" >
          <column>
           <property name="text" >
            <string>Title</string>
           </property>
          </column>
          <column>
           <property name="text" >
            <string>Size</string>
           </property>
          </column>
         </widget>
        </item>
        <item row="2" column="0" >
         <widget class="QPushButton" name="search_clear" >
          <property name="text" >
           <string>Clear</string>
          </property>
         </widget>
        </item>
        <item row="2" column="1" colspan="2" >
         <spacer name="horizontalSpacer_2" >
          <property name="orientation" >
           <enum>Qt::Horizontal</enum>
          </property>
          <property name="sizeHint" stdset="0" >
           <size>
            <width>278</width>
            <height>20</height>
           </size>
          </property>
         </spacer>
        </item>
       </layout>
      </widget>
      <widget class="QWidget" name="tab_3" >
       <attribute name="title" >
        <string>Download</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout_4" >
        <item row="0" column="0" colspan="2" >
         <widget class="QTreeWidget" name="tree_downloads" >
          <column>
           <property name="text" >
            <string>Filename</string>
           </property>
          </column>
          <column>
           <property name="text" >
            <string>Status</string>
           </property>
          </column>
          <column>
           <property name="text" >
            <string>Progress</string>
           </property>
          </column>
          <column>
           <property name="text" >
            <string>Url</string>
           </property>
          </column>
         </widget>
        </item>
        <item row="1" column="0" >
         <widget class="QPushButton" name="button_clear" >
          <property name="text" >
           <string>Clear </string>
          </property>
         </widget>
        </item>
        <item row="1" column="1" >
         <spacer name="horizontalSpacer_3" >
          <property name="orientation" >
           <enum>Qt::Horizontal</enum>
          </property>
          <property name="sizeHint" stdset="0" >
           <size>
            <width>333</width>
            <height>20</height>
           </size>
          </property>
         </spacer>
        </item>
       </layout>
      </widget>
      <widget class="QWidget" name="tab_4" >
       <attribute name="title" >
        <string>Converts</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout_6" >
        <item row="0" column="0" colspan="2" >
         <widget class="QTreeWidget" name="tree_converts" >
          <column>
           <property name="text" >
            <string>File</string>
           </property>
          </column>
          <column>
           <property name="text" >
            <string>Status</string>
           </property>
          </column>
         </widget>
        </item>
        <item row="1" column="0" >
         <widget class="QLabel" name="label_3" >
          <property name="text" >
           <string>Convert files to</string>
          </property>
         </widget>
        </item>
        <item row="1" column="1" >
         <widget class="QComboBox" name="convert_option_outputformat" />
        </item>
        <item row="2" column="0" >
         <widget class="QLabel" name="label_4" >
          <property name="text" >
           <string>Append to playlist</string>
          </property>
         </widget>
        </item>
        <item row="2" column="1" >
         <widget class="QComboBox" name="convert_options_appendtoplaylist" >
          <item>
           <property name="text" >
            <string>Yes</string>
           </property>
          </item>
          <item>
           <property name="text" >
            <string>No</string>
           </property>
          </item>
         </widget>
        </item>
       </layout>
      </widget>
     </widget>
    </item>
    <item row="1" column="0" >
     <widget class="QPushButton" name="button_play" >
      <property name="text" >
       <string>play/pause</string>
      </property>
     </widget>
    </item>
    <item row="1" column="1" >
     <widget class="QPushButton" name="button_stop" >
      <property name="text" >
       <string>stop</string>
      </property>
     </widget>
    </item>
    <item row="1" column="2" >
     <spacer name="horizontalSpacer_4" >
      <property name="orientation" >
       <enum>Qt::Horizontal</enum>
      </property>
      <property name="sizeHint" stdset="0" >
       <size>
        <width>168</width>
        <height>20</height>
       </size>
      </property>
     </spacer>
    </item>
    <item row="1" column="3" >
     <spacer name="horizontalSpacer" >
      <property name="orientation" >
       <enum>Qt::Horizontal</enum>
      </property>
      <property name="sizeHint" stdset="0" >
       <size>
        <width>228</width>
        <height>25</height>
       </size>
      </property>
     </spacer>
    </item>
    <item row="1" column="4" >
     <widget class="QSlider" name="horizontalSlider" >
      <property name="orientation" >
       <enum>Qt::Horizontal</enum>
      </property>
     </widget>
    </item>
    <item row="1" column="5" >
     <widget class="QPushButton" name="button_mute" >
      <property name="text" >
       <string>mute</string>
      </property>
     </widget>
    </item>
    <item row="2" column="0" colspan="6" >
     <widget class="Line" name="line" >
      <property name="orientation" >
       <enum>Qt::Horizontal</enum>
      </property>
     </widget>
    </item>
    <item row="3" column="0" colspan="3" >
     <widget class="QLabel" name="label" >
      <property name="sizePolicy" >
       <sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
      <property name="text" >
       <string>No media playing</string>
      </property>
     </widget>
    </item>
   </layout>
  </widget>
  <widget class="QMenuBar" name="menubar" >
   <property name="geometry" >
    <rect>
     <x>0</x>
     <y>0</y>
     <width>805</width>
     <height>26</height>
    </rect>
   </property>
   <widget class="QMenu" name="menuVidiqatch" >
    <property name="title" >
     <string>File</string>
    </property>
    <addaction name="actionOpen_url" />
    <addaction name="actionOpen_internet_mediafile" />
    <addaction name="separator" />
    <addaction name="actionExit" />
   </widget>
   <widget class="QMenu" name="menuHelp" >
    <property name="title" >
     <string>Help</string>
    </property>
    <addaction name="actionAbout" />
    <addaction name="separator" />
    <addaction name="actionCheck_for_updates" />
   </widget>
   <addaction name="menuVidiqatch" />
   <addaction name="menuHelp" />
  </widget>
  <action name="actionOpen_url" >
   <property name="text" >
    <string>Open website url</string>
   </property>
  </action>
  <action name="actionOpen_internet_mediafile" >
   <property name="text" >
    <string>Open internet mediafile</string>
   </property>
  </action>
  <action name="actionExit" >
   <property name="text" >
    <string>Exit</string>
   </property>
  </action>
  <action name="actionAbout" >
   <property name="text" >
    <string>About</string>
   </property>
  </action>
  <action name="actionCheck_for_updates" >
   <property name="text" >
    <string>Check for updates</string>
   </property>
  </action>
 </widget>
 <resources/>
 <connections/>
</ui>

Offline profoX

  • Lid
    • wesley
    • Lionslink
  • Steunpunt: Nee
Re: QT4.4.3 mainWidget setCentralWidget
« Reactie #1 Gepost op: 2009/01/03, 17:24:15 »
Bij mij werkt het prima...

wesley@hox:~/dev/vidi$ pyuic4 test.ui > test.py
wesley@hox:~/dev/vidi$ pyuic4 --version
Python User Interface Compiler 4.4.3 for Qt version 4.4.1
Human Knowledge Belongs To The World -- Antitrust (2001)
Nederlandstalige Ubuntu documentatie van Ubuntu-NL (wiki)

Offline Koen Bokern

  • Lid
  • Steunpunt: Nee
Re: QT4.4.3 mainWidget setCentralWidget
« Reactie #2 Gepost op: 2009/01/03, 22:29:08 »
Hmm misschien klopt niet alles bij mij... Maar de oude vidiqatch heeft geen import errors.

# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'dev/vidiqatch.ui'
#
# Created: Sat Jan  3 22:26:09 2009
#      by: PyQt4 UI code generator 4.4.3
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(805, 418)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
        MainWindow.setSizePolicy(sizePolicy)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout = QtGui.QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName("gridLayout")
        self.videoframe = QtGui.QWidget(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.videoframe.sizePolicy().hasHeightForWidth())
        self.videoframe.setSizePolicy(sizePolicy)
        self.videoframe.setMouseTracking(True)
        self.videoframe.setStyleSheet("background-color: #D1D1D1; border: 2px #666666;")
        self.videoframe.setObjectName("videoframe")
        self.gridLayout_3 = QtGui.QGridLayout(self.videoframe)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.gridLayout.addWidget(self.videoframe, 0, 0, 1, 3)
        self.tabWidget = QtGui.QTabWidget(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
        self.tabWidget.setSizePolicy(sizePolicy)
        self.tabWidget.setObjectName("tabWidget")
        self.tab = QtGui.QWidget()
        self.tab.setObjectName("tab")
        self.tree_playlist = QtGui.QTreeWidget(self.tab)
        self.tree_playlist.setGeometry(QtCore.QRect(9, 9, 419, 227))
        self.tree_playlist.setObjectName("tree_playlist")
        self.pushButton = QtGui.QPushButton(self.tab)
        self.pushButton.setGeometry(QtCore.QRect(9, 242, 136, 28))
        self.pushButton.setObjectName("pushButton")
        self.pushButton_2 = QtGui.QPushButton(self.tab)
        self.pushButton_2.setGeometry(QtCore.QRect(151, 242, 135, 28))
        self.pushButton_2.setObjectName("pushButton_2")
        self.pushButton_3 = QtGui.QPushButton(self.tab)
        self.pushButton_3.setGeometry(QtCore.QRect(292, 242, 136, 28))
        self.pushButton_3.setObjectName("pushButton_3")
        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QtGui.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.gridLayout_2 = QtGui.QGridLayout(self.tab_2)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.label_2 = QtGui.QLabel(self.tab_2)
        self.label_2.setObjectName("label_2")
        self.gridLayout_2.addWidget(self.label_2, 0, 0, 1, 2)
        self.searchengine = QtGui.QComboBox(self.tab_2)
        self.searchengine.setObjectName("searchengine")
        self.gridLayout_2.addWidget(self.searchengine, 0, 2, 1, 1)
        self.tree_search = QtGui.QTreeWidget(self.tab_2)
        self.tree_search.setObjectName("tree_search")
        self.gridLayout_2.addWidget(self.tree_search, 1, 0, 1, 3)
        self.search_clear = QtGui.QPushButton(self.tab_2)
        self.search_clear.setObjectName("search_clear")
        self.gridLayout_2.addWidget(self.search_clear, 2, 0, 1, 1)
        spacerItem = QtGui.QSpacerItem(278, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.gridLayout_2.addItem(spacerItem, 2, 1, 1, 2)
        self.tabWidget.addTab(self.tab_2, "")
        self.tab_3 = QtGui.QWidget()
        self.tab_3.setObjectName("tab_3")
        self.gridLayout_4 = QtGui.QGridLayout(self.tab_3)
        self.gridLayout_4.setObjectName("gridLayout_4")
        self.tree_downloads = QtGui.QTreeWidget(self.tab_3)
        self.tree_downloads.setObjectName("tree_downloads")
        self.gridLayout_4.addWidget(self.tree_downloads, 0, 0, 1, 2)
        self.button_clear = QtGui.QPushButton(self.tab_3)
        self.button_clear.setObjectName("button_clear")
        self.gridLayout_4.addWidget(self.button_clear, 1, 0, 1, 1)
        spacerItem1 = QtGui.QSpacerItem(333, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.gridLayout_4.addItem(spacerItem1, 1, 1, 1, 1)
        self.tabWidget.addTab(self.tab_3, "")
        self.tab_4 = QtGui.QWidget()
        self.tab_4.setObjectName("tab_4")
        self.gridLayout_6 = QtGui.QGridLayout(self.tab_4)
        self.gridLayout_6.setObjectName("gridLayout_6")
        self.tree_converts = QtGui.QTreeWidget(self.tab_4)
        self.tree_converts.setObjectName("tree_converts")
        self.gridLayout_6.addWidget(self.tree_converts, 0, 0, 1, 2)
        self.label_3 = QtGui.QLabel(self.tab_4)
        self.label_3.setObjectName("label_3")
        self.gridLayout_6.addWidget(self.label_3, 1, 0, 1, 1)
        self.convert_option_outputformat = QtGui.QComboBox(self.tab_4)
        self.convert_option_outputformat.setObjectName("convert_option_outputformat")
        self.gridLayout_6.addWidget(self.convert_option_outputformat, 1, 1, 1, 1)
        self.label_4 = QtGui.QLabel(self.tab_4)
        self.label_4.setObjectName("label_4")
        self.gridLayout_6.addWidget(self.label_4, 2, 0, 1, 1)
        self.convert_options_appendtoplaylist = QtGui.QComboBox(self.tab_4)
        self.convert_options_appendtoplaylist.setObjectName("convert_options_appendtoplaylist")
        self.convert_options_appendtoplaylist.addItem(QtCore.QString())
        self.convert_options_appendtoplaylist.addItem(QtCore.QString())
        self.gridLayout_6.addWidget(self.convert_options_appendtoplaylist, 2, 1, 1, 1)
        self.tabWidget.addTab(self.tab_4, "")
        self.gridLayout.addWidget(self.tabWidget, 0, 3, 1, 3)
        self.button_play = QtGui.QPushButton(self.centralwidget)
        self.button_play.setObjectName("button_play")
        self.gridLayout.addWidget(self.button_play, 1, 0, 1, 1)
        self.button_stop = QtGui.QPushButton(self.centralwidget)
        self.button_stop.setObjectName("button_stop")
        self.gridLayout.addWidget(self.button_stop, 1, 1, 1, 1)
        spacerItem2 = QtGui.QSpacerItem(168, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem2, 1, 2, 1, 1)
        spacerItem3 = QtGui.QSpacerItem(228, 25, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem3, 1, 3, 1, 1)
        self.horizontalSlider = QtGui.QSlider(self.centralwidget)
        self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSlider.setObjectName("horizontalSlider")
        self.gridLayout.addWidget(self.horizontalSlider, 1, 4, 1, 1)
        self.button_mute = QtGui.QPushButton(self.centralwidget)
        self.button_mute.setObjectName("button_mute")
        self.gridLayout.addWidget(self.button_mute, 1, 5, 1, 1)
        self.line = QtGui.QFrame(self.centralwidget)
        self.line.setFrameShape(QtGui.QFrame.HLine)
        self.line.setFrameShadow(QtGui.QFrame.Sunken)
        self.line.setObjectName("line")
        self.gridLayout.addWidget(self.line, 2, 0, 1, 6)
        self.label = QtGui.QLabel(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 3, 0, 1, 3)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 805, 26))
        self.menubar.setObjectName("menubar")
        self.menuVidiqatch = QtGui.QMenu(self.menubar)
        self.menuVidiqatch.setObjectName("menuVidiqatch")
        self.menuHelp = QtGui.QMenu(self.menubar)
        self.menuHelp.setObjectName("menuHelp")
        MainWindow.setMenuBar(self.menubar)
        self.actionOpen_url = QtGui.QAction(MainWindow)
        self.actionOpen_url.setObjectName("actionOpen_url")
        self.actionOpen_internet_mediafile = QtGui.QAction(MainWindow)
        self.actionOpen_internet_mediafile.setObjectName("actionOpen_internet_mediafile")
        self.actionExit = QtGui.QAction(MainWindow)
        self.actionExit.setObjectName("actionExit")
        self.actionAbout = QtGui.QAction(MainWindow)
        self.actionAbout.setObjectName("actionAbout")
        self.actionCheck_for_updates = QtGui.QAction(MainWindow)
        self.actionCheck_for_updates.setObjectName("actionCheck_for_updates")
        self.menuVidiqatch.addAction(self.actionOpen_url)
        self.menuVidiqatch.addAction(self.actionOpen_internet_mediafile)
        self.menuVidiqatch.addSeparator()
        self.menuVidiqatch.addAction(self.actionExit)
        self.menuHelp.addAction(self.actionAbout)
        self.menuHelp.addSeparator()
        self.menuHelp.addAction(self.actionCheck_for_updates)
        self.menubar.addAction(self.menuVidiqatch.menuAction())
        self.menubar.addAction(self.menuHelp.menuAction())

        self.retranslateUi(MainWindow)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Vidiqatch", None, QtGui.QApplication.UnicodeUTF8))
        self.tree_playlist.headerItem().setText(0, QtGui.QApplication.translate("MainWindow", "Media", None, QtGui.QApplication.UnicodeUTF8))
        self.tree_playlist.headerItem().setText(1, QtGui.QApplication.translate("MainWindow", "Time", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton.setText(QtGui.QApplication.translate("MainWindow", "Clear playlist", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_2.setText(QtGui.QApplication.translate("MainWindow", "Save playlist", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_3.setText(QtGui.QApplication.translate("MainWindow", "Load playlist", None, QtGui.QApplication.UnicodeUTF8))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QtGui.QApplication.translate("MainWindow", "Playlist", None, QtGui.QApplication.UnicodeUTF8))
        self.label_2.setText(QtGui.QApplication.translate("MainWindow", "Searchengine", None, QtGui.QApplication.UnicodeUTF8))
        self.tree_search.headerItem().setText(0, QtGui.QApplication.translate("MainWindow", "Title", None, QtGui.QApplication.UnicodeUTF8))
        self.tree_search.headerItem().setText(1, QtGui.QApplication.translate("MainWindow", "Size", None, QtGui.QApplication.UnicodeUTF8))
        self.search_clear.setText(QtGui.QApplication.translate("MainWindow", "Clear", None, QtGui.QApplication.UnicodeUTF8))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), QtGui.QApplication.translate("MainWindow", "Search", None, QtGui.QApplication.UnicodeUTF8))
        self.tree_downloads.headerItem().setText(0, QtGui.QApplication.translate("MainWindow", "Filename", None, QtGui.QApplication.UnicodeUTF8))
        self.tree_downloads.headerItem().setText(1, QtGui.QApplication.translate("MainWindow", "Status", None, QtGui.QApplication.UnicodeUTF8))
        self.tree_downloads.headerItem().setText(2, QtGui.QApplication.translate("MainWindow", "Progress", None, QtGui.QApplication.UnicodeUTF8))
        self.tree_downloads.headerItem().setText(3, QtGui.QApplication.translate("MainWindow", "Url", None, QtGui.QApplication.UnicodeUTF8))
        self.button_clear.setText(QtGui.QApplication.translate("MainWindow", "Clear ", None, QtGui.QApplication.UnicodeUTF8))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), QtGui.QApplication.translate("MainWindow", "Download", None, QtGui.QApplication.UnicodeUTF8))
        self.tree_converts.headerItem().setText(0, QtGui.QApplication.translate("MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8))
        self.tree_converts.headerItem().setText(1, QtGui.QApplication.translate("MainWindow", "Status", None, QtGui.QApplication.UnicodeUTF8))
        self.label_3.setText(QtGui.QApplication.translate("MainWindow", "Convert files to", None, QtGui.QApplication.UnicodeUTF8))
        self.label_4.setText(QtGui.QApplication.translate("MainWindow", "Append to playlist", None, QtGui.QApplication.UnicodeUTF8))
        self.convert_options_appendtoplaylist.setItemText(0, QtGui.QApplication.translate("MainWindow", "Yes", None, QtGui.QApplication.UnicodeUTF8))
        self.convert_options_appendtoplaylist.setItemText(1, QtGui.QApplication.translate("MainWindow", "No", None, QtGui.QApplication.UnicodeUTF8))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_4), QtGui.QApplication.translate("MainWindow", "Converts", None, QtGui.QApplication.UnicodeUTF8))
        self.button_play.setText(QtGui.QApplication.translate("MainWindow", "play/pause", None, QtGui.QApplication.UnicodeUTF8))
        self.button_stop.setText(QtGui.QApplication.translate("MainWindow", "stop", None, QtGui.QApplication.UnicodeUTF8))
        self.button_mute.setText(QtGui.QApplication.translate("MainWindow", "mute", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("MainWindow", "No media playing", None, QtGui.QApplication.UnicodeUTF8))
        self.menuVidiqatch.setTitle(QtGui.QApplication.translate("MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8))
        self.menuHelp.setTitle(QtGui.QApplication.translate("MainWindow", "Help", None, QtGui.QApplication.UnicodeUTF8))
        self.actionOpen_url.setText(QtGui.QApplication.translate("MainWindow", "Open website url", None, QtGui.QApplication.UnicodeUTF8))
        self.actionOpen_internet_mediafile.setText(QtGui.QApplication.translate("MainWindow", "Open internet mediafile", None, QtGui.QApplication.UnicodeUTF8))
        self.actionExit.setText(QtGui.QApplication.translate("MainWindow", "Exit", None, QtGui.QApplication.UnicodeUTF8))
        self.actionAbout.setText(QtGui.QApplication.translate("MainWindow", "About", None, QtGui.QApplication.UnicodeUTF8))
        self.actionCheck_for_updates.setText(QtGui.QApplication.translate("MainWindow", "Check for updates", None, QtGui.QApplication.UnicodeUTF8))

Dat krijg ik voor code... Wellicht klopt niet alles (na het upgraden naar de nieuwste versie wellicht). Welke paketten zouden dat kunnen zijn?

Het gaat mis bij  "MainWindow.setCentralWidget(self.centralwidget)" en bij "MainWindow.setMenuBar(self.menubar)". De oude vidiqatch doet het denk ik niet vanwege het menu.

Offline profoX

  • Lid
    • wesley
    • Lionslink
  • Steunpunt: Nee
Re: QT4.4.3 mainWidget setCentralWidget
« Reactie #3 Gepost op: 2009/01/03, 23:24:24 »
Ik snap het niet. Wat voor "import errors"? In je eerste bericht staat niets over "import errors", daar lijkt het erop alsof pyuic4 zijn werk niet goed doet, maar aangezien je wel een .py file krijgt gegenereerd met pyuic4 snap ik het probleem niet.
Human Knowledge Belongs To The World -- Antitrust (2001)
Nederlandstalige Ubuntu documentatie van Ubuntu-NL (wiki)

Offline Koen Bokern

  • Lid
  • Steunpunt: Nee
Re: QT4.4.3 mainWidget setCentralWidget
« Reactie #4 Gepost op: 2009/01/04, 00:27:30 »
Nee geen import errors inderdaad. Van google wordt ik ook niet wijzer.

koen@solar:~/Bureaublad/vidiqatch_2.0_dev$ python vidiqatch/vidiqatch.pyTraceback (most recent call last):
  File "vidiqatch/vidiqatch.py", line 91, in <module>
    f = vidiqatch()
  File "vidiqatch/vidiqatch.py", line 82, in __init__
    self.ui.setupUi(self)
  File "/home/koen/Bureaublad/vidiqatch_2.0_dev/vidiqatch/vidiqatch_ui.py", line 144, in setupUi
    MainWindow.setCentralWidget(self.centralwidget)
AttributeError: setCentralWidget
koen@solar:~/Bureaublad/vidiqatch_2.0_dev$

Dat is wat ik letterlijk krijg. Kan ik nog iets doen om te debuggen? Of zou ik alles tot op het bot verwijderen met --purge, en dan overnieuw installeren?

edit
De code van vidiqatch.py:
#!/usr/bin/python
#
#    vidiqatch - Grab, rip and convert flash videos on a website
#                to mp3, avi, mpeg...
#
#    Copyright (C) 2008 Koenux Projects
#
#      Programmers:
#        - Koenux (vlerkknozem at gmail dot com)
#        - profoX (wesley at ubuntu dot com)
#
#      Contributions:
#        - Included icons are from the KDE 4 Oxygen icon set (http://www.oxygen-icons.org/)
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#


#**************************************************#
#*************** IMPORTS **************************#
#**************************************************#

# Import modules
try:
    import sys, os, urllib, urllib2, re, string, random
    from htmllib import HTMLParser
    from PyQt4.QtGui import *
    from PyQt4.QtCore import *
    from PyQt4.QtNetwork import *
    from time import gmtime, strftime
    import gobject
    gobject.threads_init()
except ImportError, msg:
    print "Couldn't import all required modules."
    print "ImportError: " + str(msg)
    sys.exit()

# Import vidiqatch
try:
    from vidiqatch_ui import Ui_MainWindow
except ImportError, msg:
    print "Couldn't import all vidiqatch modules."
    print "ImportError: " + str(msg)
    sys.exit()



#**************************************************#
#*************** VIDIQATCH ************************#
#**************************************************#

class vidiqatch(QWidget):
    def __init__(self, parent=None):
        QWidget.__init__(self, parent)

        # Configuration
self.version = "2.0.0"
        self.cfg = QSettings("VidiQatch");
self.updatefile = "http://vidiqatch.org/vidiqatch_debian.updates"

        # GUI interface
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)


app = QApplication(sys.argv)
absDir = QFileInfo(QCoreApplication.arguments()[0]).absolutePath() + "/"
appTranslator  = QTranslator()
appTranslator.load(absDir+'translations/'+QLocale.system().name())
app.installTranslator(appTranslator)

f = vidiqatch()
f.show()
sys.exit(app.exec_())
« Laatst bewerkt op: 2009/01/04, 00:39:38 door Koen Bokern »

Offline profoX

  • Lid
    • wesley
    • Lionslink
  • Steunpunt: Nee
Re: QT4.4.3 mainWidget setCentralWidget
« Reactie #5 Gepost op: 2009/01/04, 00:46:03 »
class vidiqatch(QWidget):
en QWidget.__init__(self, parent)

moet respectievelijk

class vidiqatch(QMainWindow):
en QMainWindow.__init__(self, parent)

worden
Human Knowledge Belongs To The World -- Antitrust (2001)
Nederlandstalige Ubuntu documentatie van Ubuntu-NL (wiki)

Offline Koen Bokern

  • Lid
  • Steunpunt: Nee
Re: QT4.4.3 mainWidget setCentralWidget
« Reactie #6 Gepost op: 2009/01/04, 00:57:16 »
Als ik jou  niet had profoX, dan kon ik net zo goed meteen mijn computer opeten. Wat een domme fout van me zeg...
Maargoed, opvallend is dat ik zo vaak op google mijn eigen topics over qt4 vind als ik een oplossing zoek voor een probleem. Damn wat is dit forum goed in google geindexeerd. Dit forum is onder de hand de grootste nl/be documentatiebron voor qt4 lijkt het.

Offline profoX

  • Lid
    • wesley
    • Lionslink
  • Steunpunt: Nee
Re: QT4.4.3 mainWidget setCentralWidget
« Reactie #7 Gepost op: 2009/01/04, 00:58:43 »
lol :) inderdaad.. ik kom ook vaak ubuntu-nl forum topics tegen in google
Human Knowledge Belongs To The World -- Antitrust (2001)
Nederlandstalige Ubuntu documentatie van Ubuntu-NL (wiki)

Offline dvdmeer

  • Lid
    • Python-RandR :: dvdmeer.nl
  • Steunpunt: Nee
Re: QT4.4.3 mainWidget setCentralWidget
« Reactie #8 Gepost op: 2009/01/04, 13:47:43 »
self.updatefile = "http://vidiqatch.org/vidiqatch_debian.updates"

Wat ben je hiermee van plan? Laat je daarmee alleen zien of er updates zijn?

Offline Koen Bokern

  • Lid
  • Steunpunt: Nee
Re: QT4.4.3 mainWidget setCentralWidget
« Reactie #9 Gepost op: 2009/01/04, 23:46:05 »
self.updatefile = "http://vidiqatch.org/vidiqatch_debian.updates"

Wat ben je hiermee van plan? Laat je daarmee alleen zien of er updates zijn?
Klopt. Ik maak gewoon een float van de versienummers. Als de float in het online bestandje hoger is dan die in vidiqatch dan krijg je een klein berichtje op de hoofdtap te zien dat er een nieuwe versie is met een linkje. Al van sommige mensen gehoord dat ze het beter zouden vinden dat hij dan ook automatisch kan updaten, maar dat lijkt me lijp en ga ik dus ook niet doen. Ook niet voor de windows versie overigens.

Eigenlijk hetzelfde als bij amsn. Alleen dan controlleer ik de versie automatisch bij startup. Maar net als bij amsn dus alleen een link naar de nieuwere versie. Hoewel ik nu gewoon een directe link maak naar de deb. Dat ga ik denk ik nog aanpassen, dat de link gewoon naar de downloadpagina verwijst.
« Laatst bewerkt op: 2009/01/04, 23:47:54 door Koen Bokern »

Offline Nunslaughter

  • Lid
    • timovwb
  • Steunpunt: Nee
Re: QT4.4.3 mainWidget setCentralWidget
« Reactie #10 Gepost op: 2009/01/05, 07:35:13 »
Ge kunt ook een kleine repo aanmaken voor de debian pakketjes.

Offline Koen Bokern

  • Lid
  • Steunpunt: Nee
Re: QT4.4.3 mainWidget setCentralWidget
« Reactie #11 Gepost op: 2009/01/05, 22:49:53 »
Geen idee hoe ik dat moet fixen. Maar daar kijk ik wel naar als ik een goede nieuwe versie heb.

Pfff maar dat kan nog wel even duren. Nu zit ik weer vast bij QtXML. Gewoon geen goede tutorials/wiki's hierover te vinden.

Offline Nunslaughter

  • Lid
    • timovwb
  • Steunpunt: Nee
Re: QT4.4.3 mainWidget setCentralWidget
« Reactie #12 Gepost op: 2009/01/06, 10:41:38 »
Hier alvast een link naar een postje van mij over hoe ge in een paar minuten een eigen repository opzet: http://forum.ubuntu-nl.org/index.php/topic,33339.msg324746.html#msg324746

Offline Koen Bokern

  • Lid
  • Steunpunt: Nee
Re: QT4.4.3 mainWidget setCentralWidget
« Reactie #13 Gepost op: 2009/01/11, 14:14:27 »
Bookmark!!! Thanks  Nunslaughter! Dan hoef ik de versie check alleen tijdelijk in de bouwen als ik het ga porten naar windows.